execution of math on a list of numbers using applescript

I have three columns of numbers in a text file (using BBEdit, impossible to use numbers as there are more than 1 million lines):

299400 3275700 - 57.9788

299500-3275700 - 57.9811

299300 3275600 - 57.9346

299400 3275600 - 58.0249

299500-3275600 - 58.0026

...

I simply multiply the last column (what happens to start by "-") by the value of 0.75, but I am confused.

Beginning AppleScript, so I looked everywhere for example scripts manipulation of numbers but not lucky to have.

So far, I have this:

"But I get this error message: error "cannot make characters 16 through 23 of \"tmp_ITFR2000.txt\ text document" application \"BBEdit\" number. "- 1700 characters 16 to 23 of 'class TxtD '"tmp_ITFR2000.txt"to the number of number

I have to somehow dimension > a number variable?

Thank you

Jim

Use the following line:

output to found the results as a string as a number object

(137021)

Tags: Mac OS & System Software

Similar Questions

  • List of numbers start with a number other than 1?

    Hi all


    I supervised two side by side (since I can't do 1 column 2 text box).

    I need the list numbering from 1 to 5 on the left and 6-10 on the right.

    I can't find a way to change the starting number of the list of numbers. Any ideas how I can do?

    Any help appricated!

    Ordered lists support different numbering schemes and start numbers shifts. Unfortunately Muse doesn't expose all this kind of things, so you need to change the published HTML. Refer to this:

    Ol HTML tag

    Mylenium

  • List of numbers

    I need to strip the numbers manual and replace them with the automatic paragraph numbers.

    1 1.     text

    2 2.     Text2

    Is this possible via the script. It can be applied only in the list of numbers

    You need to escape the backslashes: ' ^ \\d+?\\.\\t+ ';

    But the way you did, without defining a replacement string, applies only to the paragraph style NL, it does not remove the manual numbering. To apply the style and remove the number, follow these steps:

    app.findGrepPreferences=null;
    app.changeGrepPreferences=null;
    app.findGrepPreferences.findWhat="^\\d+?\\.\\t+(.)";
    app.changeGrepPreferences.changeTo="$1";
    app.changeGrepPreferences.appliedParagraphStyle="NL";
    app.activeDocument.changeGrep();
    

    Peter

  • the list of numbers between two columns

    Hello

    I need the list of numbers between two columns.

    My source table contains the intervals with different ranges and I'm currently thinking dividing them by size.

    I was able to get a solution following the information contained in the Web page:
    http://StackOverflow.com/questions/3971981/get-list-of-numbers-in-between-two-columns

    The solution I've used is based on the following example:
    with t as (   
      select 10 startnum, 15 endnum from dual   
      union all   
      select 18, 22 from dual   
      union all   
      select 10000, 19999999999 from dual   
    )   
    select lvl   
      from (select level lvl  
               from dual  
            connect by level <= (select max(endnum) from t)) a  
      where exists (  
         select 1  
           from t  
          where lvl between t.startnum and t.endnum ) 
    But this doesn't work in my table if I have few and modest intervals (maximum 5 digits range).
    In the example, I was trying to understand why this might be failing, but I do not have a conclusion yet.
    There is something I noticed and that I try to understand, that is:
    If I change this query to:
    with t as (   
      select 10 startnum, 15 endnum from dual   
      union all   
      select 18, 22 from dual   
      union all   
      select 19999999990, 19999999999 from dual   
    )   
    select lvl   
      from (select level lvl  
               from dual  
            connect by level <= (select max(endnum) from t)) a  
      where exists (  
         select 1  
           from t  
          where lvl between t.startnum and t.endnum ) 
    It will increase from 2 to 3 seconds to return results to a few minutes at least (canceled after a few minutes!)

    Thus, using this example to understand if my problem is related to having many between start and end number or if it is linked with having small intervals between large numbers.

    Can someone explain to me why I have this speed of different treatment depending on the value of the interval? And why it takes longer with the small interval?

    I need to apply it to different beaches (from 2 ranges of numbers to 16 range) and in all ranges, I will have small intervals to check.

    For example:
    endnum startnum
    7341 7342
    7422-7423
    7439 7456

    2522200050 2522200054
    2522200146 2522200150

    4216969839880 4216969839884
    4216969839893 4216969839897

    Having this problem I can only ask the first values I have in the picture!

    Best regards
    Ricardo Tomas

    Hi, Ricardo,

    Here's one way:

    WITH       cntr     AS
    (
         SELECT     LEVEL - 1     AS n
         FROM     (
                  SELECT  MAX ( endnum - startnum)     AS max_diff
                  FROM    t
              )
         CONNECT BY     LEVEL <= max_diff + 1
    )
    SELECT  startnum + c.n
    FROM     t
    JOIN     cntr  c      ON   t.endnum  >= t.startnum + c.n
    ;
    

    In your original query, you generate all the numbers from 1 to the highest endnum. You only need enough numbers to cover the range of startnum to endnum. (This method also works if startnum is less than 1).
    Joins are usually faster than EXISTS subqueries.

  • How to round numbers using javascript in Adobe Acrobat Pro?

    How to round numbers using java script in Adobe Acrobat Pro?

    For example:

    1.2 becomes 1.0

    1.7 becomes 2.0

    Thank you.

    Assuming that you have already defined the field to a category of format number and limited to a single digit to the right of the decimal separator, you can use the following custom validation script:

    Custom validation script

    Event.Value = Math.round (event.value);

    More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/roun d

  • How to select a cell in a multicolumn list box and use the horizontal scrollbar on th

    An event structure, how to select a cell in a multicolumn list box and use the horizontal scrollbar on the front panel at the same time.  I can select a cell in the multicolumn in a structure of the event, but I can't move the scroll bar on the front panel when the program is running.

    I guess that you are referring to the scroll bar in the control multi-column listbox. What does your code when you select a cell? Can you please your postal code so that we can see the behavior you describe? It is possible that you are blocked the structure of the event, as in performing an operation long in case the treatment cell selection. In this case, the structure of the event must wait until the event ends before being able to respond to the next event. You can configure the event to not lock the front panel until the event ends.

  • I recently received an e-mail that after I opened it sent spam e-mails to several people in my Yahoo contact list. I used MSE to check but doesn't show any problems.

    Possible virus

    I recently received an e-mail that after I opened it sent spam e-mails to several people in my Yahoo contact list.  I use Microsoft Essentials and immediately performed a full scan and it showed no problems.  I need to run anything additional to search for a virus?
    Hello
    Try the sequence of steps 1 and 2 in this virus/malware removal guide: http://www.selectrealsecurity.com/malware-removal-guide
    It provides detailed instructions on how to remove malware from a computer. If you have any questions, just ask. I hope this helps you.
    Brian
  • Windows 7 Doesnt list of recently used programs

    Recently used programs list, does not list the recently used programs, is not sort my most frequently used. Installation of a windows 7 Home premium.

    When a program is installed first it is listed, even if I used havnt. After I click on it, it deletes itself recently used programs and never hit list again even if I click on the icon of the button start again and again.

    Maybe it's not a menu "recently used", it is a menu "frequently used".  I saw the user of Microsoft interface Style rules and a few articles on MSDN explain the subtle differences, before... so I think that Windows is not calculate frequent that fast, or the taskbar.  If you want to display on the list, you must open it in menu start (the long way). If it was useful, you can vote by clicking on the green triangle. If it solves the problem, click on propose as answer. Thank you!

  • Whence Acrobat get the list fonts it uses when you do OCR?

    Whence Acrobat get the list fonts it uses when you do OCR?

    For example, a picture came by using the font "Helvetica", which is not on my system.  So I know that it is not using system fonts to decide what font uses the image.

    In my view, it is likely to be integrated: learned and set at the factory. I don't think you will find that it uses your actual fonts.

    (Helvetica is STILL available for use in PDF format, it has a special status).

  • You can create a table of contents with page numbers using bookmarks?

    You can create a table of contents with page numbers using bookmarks?

    Sometimes a long article has bookmarks to help navigate, it but has no real TOC (table of contents) on the first page. In such a situation, I think that it would facilitate the reading of the paper version if you can somehow create a table of contents with page based on hierarchical bookmarks in the document numbers.

    If this is not possible from Acrobat, is there a third party app?

    Indeed you have created a script for this - sorry that I missed it. I should have...

    Acrobat - Create TOC bookmarks

  • [JS] [CS4] List the fonts used in the Document

    Hi to all the gurus, scripting

    I have the following script that returns a list of the fonts used in the document:

    function fontused(){        

          var fontscoll = document.fonts;         

         for(var i = 0; i < fontscoll.length; i++){            

              var font = fontscoll[i];            

              alert(font.name);          

         }

    }

    The above works OK my problem is that it also lists the fonts used in placed illustrator (.eps) files. Is there some kind of setting or something that I can use so that the list only the fonts used in the text?

    -Horse

    Hi Charles

    Try this

    var  myDocFonts=app.documents[0].stories.everyItem().textStyleRanges.everyItem().appliedFont,
            l = myDocFonts.length, myFonts="";
            uniqueFonts = {}, n;
    while (l--) uniqueFonts[myDocFonts[l].name] = myDocFonts[l].name;
    for (n in uniqueFonts) myFonts+=(uniqueFonts[n])+"\r";
    alert(myFonts)
    

    Trevor

  • Adding an itemRenderer to a list of spark using action script

    Hi guys,.

    IM, adding a spark list using action script.

    ... IM kinda a new to Flex, I want to add a picture to an item in the list, should I use an ItemRenderer component for this?

    If so, once created Im having trouble to add it with the action script...

    my code looks like this...

    list: list var = new List();

    list.dataProvider = collection;

    I tried...

    list.itemRenderer = "views. ItemRend ".

    and...

    list.itemRenderer = ItemRend

    But I get the same error...

    1067: coercion of a value of type String to an unrelated type mx.core:IFactory. InputBox.as /RegSpotter/src/com line 68 Flex problem

    or...

    1067: constraint implied a value of class type to a type unrelated to mx.core:IFactory. InputBox.as /RegSpotter/src/com line 68 Flex problem

    Thank you

    Aidan

    myList.itemRenderer = new ClassFactory(MyItemRenderer);
    
  • Why all numbers use symbol 'L' in the following code?

    Why all numbers use symbol 'L' in the following code?
    Thank you
    public static final long MILLIS_IN_YEAR = 1000L * 60L * 60L * 24L * 365L

    qkc wrote:
    Why all numbers use symbol 'L' in the following code?
    Thank you

    public static final long MILLIS_IN_YEAR = 1000L * 60L * 60L * 24L * 365L
    

    Java language rules: an L after a literal integer in Java indicates that this constant should be kept as a long (64 bit signed) instead of int (32 bits signed).

    If you have not used to that, all the numbers on the line would be treated as integers (ints) (32 bit) and multiplier with an int int translates an int even if you want to store in a long.

    Since int cannot fully represent the full product (about 31.5 billion) as it is greater than Integer.MAX_VALUE (2 billion), so if you have not used the long as operands for multiplication, you finally get an incorrect value in MILLIS_IN_YEAR because the last multiplication would cause an overrun.

    Best regards

    Robert

  • How to create a table/list out numbers with Boolean attributes

    Hello

    Maybe the title doesn't explain it too well but what I'm trying to do I guess must be honest, I don't know how!

    I want a table of numbers to be entered by a user, and for each of these numbers, I wish to have a Boolean value, (he will later choose what action is performed on this number)

    The table size can vary

    for example

    element numeric Boolean value

    0                       5                             True

    1                       20                           True

    2                       -5                            False

    3                       10                           True

    ..

    ..

    n                       100                         False

    I don't see any list with numerical and Boolean, maybe I just have not spotted or what I need to do somehow?

    Any suggestions please?

    Thank you!

    p.s. If someone else uses Opera Browser to post here, hitting enter work correctly for you when entering text? For me, it moves the cursor climb a line instead of to the bottom! Driving me crazy! It only happens with this forum OR

    There is no control that has something you're looking for, but a simple table of clusters can work. The cluster would have a digital and a Boolean value. It is not the largest interface, but you can do a little better by masking the display index for the table and the scroll bar visibility.

  • Problem of numbered list in InDesign using paragraph Styles Code syntax highlighter

    Styles using GREP in the options of styles paragraph that I managed to make it useful, HTML, CSS, and Javascript, styles of syntax highlighter.

    Code can be copied and pasted, or can be typed and styles work well. codehighlighter_indesign.jpg.

    My only problem is with the numbering.

    I've implemented a character list ordered for my type of chip.

    Although the size of characters must be greater than the size of the code in order to get the character bar to connect and be a solid line.

    Is there a way to have the same size font for the numbering and the code and a bar of character which will connect? Do not be destroyed, because the separator between the numbered lines and the code?

    Also it doesn't seem to be a way to change the color or the weight of the bar (it must be the same color as the number) with a bar automatically generate? Is it possible?

    Here is an example of my InDesign CC 2015.4 German I did with a numbered list numbering and bar with a shading of paragraph:

    Note that the width of the 'bar' would change, if you change the width of the text block.

    5 mm added to the width of the text block:

    Or would disappear.

    The original text frame width less 5 mm:

    Kind regards
    Uwe

Maybe you are looking for

  • How can I get off your beta updates to Thunderbird 29?

    I don't want to be on your list of beta, but I continue to receive beta updates for Thunderbird 29. I just want to use 28. Please take me off of beta shipments. I'm not qualified to assess 29. Thank you.Peace,Bob

  • Cannot restore Y500 - missing partition Recovery.

    I had two of the same OS Windows 8.1 on my Y500 (cloned from the original SSD). Then, last night I tried to 'refresh without affecting your files' option for my OS on the HARD drive so I have a new OS to go back to incase anything happened. then on t

  • Conversion of Microsoft Money to speed up

    I use the International Version 14 of Microsoft Money in Australia and have 15 years of data, I need to keep access to. There is a conversion tool from third party (Quicken) to Australian customers - International version 17 of MS money. Anyone know

  • Problem install Microsoft Fix it Center

    I have Windows Vista Home Basic 32 bit program on my computer.  I tried to download and install the difficulty It Center Microsoft and failed.  Whenever I try to install the program, a window pops up saying (although this page is encrypted, the infor

  • BlackBerry smartphones little red email star won't go away

    The little red star that indicates an email is on and will not go away. No emails not open in any account. Have stopped and restarted. Without waiting for the voicemail. Any ideas on why/how to get rid of him? See you soon Karen