Applescript: how to 2 lists of numbers

I want to update a variable (list of numbers for coordinates) by adding a second list.
property winPosVar : {50, 100}
property winOffsetVar : {50, 50}
set winPosVar to winPosVar + winOffsetVar
This gives me an error, but if it worked the way I wanted, it would give me winPosVar = {100,150}.
Is it possible to add 2 lists without breaking out individiual variables for each item in the list?

Use code such as:
set list1 to {50, 100}
set list2 to {50, 50}
set list3 to {}
repeat with this_num from 1 to (count list1)
set list3 to list3 & ((item this_num of list1) + (item this_num of list2))
end repeat
(87577)

Similar Messages

  • Applescript : how to create a new numbers document

    I know you have to use +make new+ command. But how to specify the path and name. I tried +at, properties+ nothing helps.
    My code:
    *tell application "Numbers"*
    * make new sheet at "Macintosh HD:Users:Nimmy" with properties {name:"test"}*
    *end tell*
    I get an error "Numbers got an error: Can’t make "Macintosh HD:Users:Nimmy" into type location reference". I don't know what should follow (isn't +location specifier+ path to the file?). I would be grateful for anybody who can help.

    (a) it seems a bit odd to try to make a sheet before making a document.
    (b) I assumes that to make a document the location would be a folder, not a string
    (c) to make a document, it would be useful to pass a legal document's name "test" is not one of them.
    I tried with
    make new document at folder "Macintosh HD:Users:yvan_koenig:Desktop:" with properties {name:"test.numbers"}
    This time all seems to be OK but the command failed.
    Normal as it was already described.
    As far as I know, at this time, to create a document we must rely on GUIscripting.
    set myNewDoc to my makeNewDoc("test.numbers", path to documents folder as text)
    on makeNewDoc(n, d)
    tell application "Numbers" to activate
    tell application "System Events" to tell (first process whose title is "Numbers") to tell menu bar 1 to tell menu bar item 3 to tell menu 1 to click menu item 1
    (* menu bar item 3 for menu File *)
    (* menu item 1 for New *)
    tell application "Numbers" to save document 1 as n in file (d & n)
    return (d & n) as alias
    end makeNewDoc
    Yvan KOENIG (from FRANCE samedi 14 février 2009 15:44:20)

  • How can I list the songs in an album in iTunes without having to do it one by one? Some albums are not numbered.

    How can I list the songs in an album in iTunes without having to do it one by one? Some albums are not numbered or they show 1. 1. 1. 1. 1. 1. 1.

    Poor metadata needs to be corrected if the album is to display properly in iTunes. iTunes sees an "album" as any collection of tracks with the same Album title and the same Album Artist (or Artist if Album Artist isn't set). Each track of the album should have distinct Track V of W and Disc X of Y vaules. W,X,Y are optional, but X may be needed for multi disc albums.
    See Gropuing tracks into albums for details.
    tt2

  • I am using Numbers on my iPhone5 and cannot get the app to do a simple (SUM) calculation.  It shows the formula correctly in the cell, but all I get for my long list of numbers to add is 0.  How can I get this to work?

    I am using Numbers on my iPhone5 and cannot get the app to do a simple (SUM) calculation.  It shows the formula correctly in the cell, but all I get for my long list of numbers to add is 0.  How can I get this to work?

    Oaky, at least we got that far.  Next step is to determine if all those "numbers" are really numbers.  Changing the format to "number" doesn't necessarily change the string to a number. The string has to be in the form of a number.  Some may appear to you and me as numbers but will not turn into "numbers" when you change the formatting from Text to Number. Unless you've manually formatted the cells to be right justified, one way to tell if it is text or a number is the justification. Text will be justified to the left, numbers will be justified to the right.
    Here are some that will remain as strings:
    +123
    123 with a space after it.
    .123

  • How do I add a list of numbers stored in an array

    How do I add a list of numbers stored in an array? The code I
    have is showing ‘NaN’ when I try to add the second item
    in each element of the array:
    var aItemPrices:Array = new Array(["item1_mc", 10], ["item
    2_mc", 20], ["item 3_mc", 30]);
    var totalPrice:Number;
    for (i=0; i<aItemPrices.length; i++) {
    //the following line traces 'NaN'
    totalPrice += aItemPrices
    [1];
    trace("totalPrice: "+ totalPrice);

    i modified your code in 2 places, check it
    var aItemPrices:Array = new Array(["item1_mc", 10], ["item
    2_mc", 20], ["item 3_mc", 30]);
    var totalPrice:Number=0; //Mani changes
    for (i=0; i<aItemPrices.length; i++) {
    //the following line traces 'NaN'
    totalPrice += aItemPrices
    [1];//Mani changes
    trace("totalPrice: "+ totalPrice);

  • How can I sum numbers in a pdf? And, sum a partial list of numbers?

    How can I sum a list (or partial list) of numbers in a pdf?

    Thanks for your answer.  I have Adobe Acrobat 7.0 Professional.  If you
    can help me further by listing the necessary steps that would be great.
    Thanks.
    Barry Baker

  • Chapter NUMBERS? How to include list styles in TOC?

    How does one include chapter numbers!?? I have used a list style with a paragraph style as headings for chapters and paragraphs (Example: 1. Introduction | 1.1. Company X), which I now want to include in the TOC. Using the specific heading in the TOC only includes the text, and not the entire list item (number followed by text). How do I accomplish this list item to be included? Is there a way to (only) tweak the TOC style of a template?

    http://discussions.apple.com/thread.jspa?threadID=2107212&tstart=0
    Yvan KOENIG (Vallauris, FRANCE dimanche 9 août 2009 14:00:22)

  • How do I move the numbers or bullets closer to the list?

    Oh Dreamweaver sages...How do I move the numbers or bullets closer to the list?  Please look at this  http://www.stii.us/whatisst.html  and tell me what you recommend.  Thank you!

    With CSS margins and padding.
    #mainContent li {
      margin-left:10em;
      padding-left:0;
    Also remove the <p> tags from all your <li> tags.
    <ol>
         <li>this is a list item</li>
         <li>this is a list item</li>
         <li>this is a list item</li>    
    </ol>
    Nancy O.

  • How to find Sales order numbers for List of Deliveries

    Hi
    How to find Sales order numbers for List of Deliveries
    Thanks
    Muthu

    Hi,
    Open the delivery list.
    Select  a delivery, goto menubar, environmment, document flow.
    Here u can able to see the  order no. (but, here u can see one by one , not cumulatively)
    Regards
    Kaleeswaran

  • I have all my devices connected to iCloud.  I would like a reduced contact list on my iPhone without removing any from my master list on my computer.  How do I delete contact numbers from my phone without disrupting the master list on my computer?

    I have all my devices connected to iCloud.  I would like a reduced contact list on my iPhone without removing any from my master list on my computer.  How do I delete contact numbers from my iphone without disrupting the master list on my computer?

    Are you trying to reduce the visual clutter on the phone, save space on the phone, or limit the security exposure if your phone is stolen?
    If you are only wanting to reduce the visual clutter and make scrolling through the list faster, you could set up a group on the computer containing only the contacts you want to see on my phone (called, for example, "Show on my Phone") and enable only that group inside Contacts on the phone. You might even have one or more existing groups that you could enable that way (maybe "Family" and "Personal").

  • How to find number of occurance of each number in big list of numbers?

    I got big list of numbers.
    examples......4,6,30,39,27,6,25,5,6,4,
    I want to find,
    4 occur 2 times
    6 occur 3 times
    etc...
    How to do this?.
    Do we have a custom tag doing this?.
    Please let me know

    dan bracuk was my insipiration for this suggestion...
    <cfset arr = ListToArray("4,6,30,39,27,6,25,5,6,4")>
    <cfset qry = QueryNew("tmp")>
    <cfset QueryAddColumn(qry, "num", arr)>
    <cfquery name="qTotal" dbtype="query">
    SELECT num, count(num) occur
    FROM qry
    GROUP BY num
    </cfquery>
    <cfdump var="#qTotal#">

  • How do I generate random numbers from a list of numbers without repeating any number

    I am trying to generate a list of random numbers without any repeating numbers.  For example say the list is from 1 to 15, how do I randomly generate a list of numbers using each number only once?

    pb,
    You can build a randomizer by making a 2-column table with 15 rows. In Column A, Fill with the numbers 1 to 15. In column B Fill with RAND(). Then sort on Column B. There will now be a randomized list of the numbers from 1 to 15 in Column A. You can copy this random list and use it in your application.
    Jerry

  • How can I read In a list of numbers

    I have a group of addressable sensors on a RS-485 line. I have LV generating the string that polls each of the sensors and then receives the data string as a response. Right now I can only poll the sensors sequentially. I need to poll eg. 01,04,05,06,09,etc. How can I get a user defined list of numbers read into a loop in the order/sequence I desire?? Once the list is completly read I want to go to the beginning and strart the list again. Thanks for any help.
    S

    You can have the user-defined numbers in an Array. Wire this Array to a For-loop with indexing enabled (default behavior). This way, your For-loop will index one number at a time and will stop after all are done.
    Hope this helps. Write back if I misunderstood your question.
    Regards,
    Khalid

  • How to find max value from a list of numbers stored in a varray?

    hi,
    Can any body help me to get the max value from a list of numbers stored in a varray?
    thanks in advance....
    regards
    LaxmiNarsimha

    Yes. Could you post what you have tried before we start helping you in this?

  • AppleScript open and save file with Numbers

    Hi all,
    I need to save an Excel .xls file as an .xls file in order to break the links that are included in the original Excel file. Since Numbers doesn't have any actions for Automator, I hoped someone could help me writing an AppleScript?
    It needs to open (Numbers) and all the .xls files that are added to a specific folder on my Mac, then save them to another folder as .xls (not .xlsx) and overwrite any existing files with same name. Since this all should work automatically, warnings and pop-ups that need a user to click an option are not allowed.
    Didn't think this could be too hard, but I'm just a noob when it comes to AppleScript. Help?
    Thanks in advance

    Check the attributes of the <textarea> tag. You can use wrap="no" or wrap="virtual" or wrap="hard" to define how the text area handles carriage returns.
    Brian

Maybe you are looking for

  • Error messages related to iwlwifi and missing rfkill devices

    I have got number of error messages regarding iwlwifi and I am unable to interpret them. Please suggest. Jul 29 00:00:03 my_hostname systemd[1]: Starting Rotate log files... Jul 29 00:00:03 my_hostname systemd[1]: Starting Update man-db cache... Jul

  • Pros and  cons  of  select  for  update  clause

    hi, Can anybody explain what are the pros and cons of select for update clause 11.2.0.1

  • Portal Content error when opening BEx Portfolio in EP

    I am trying to open BEx portfolio but an error is coming when i tried to opne it. The error is as below : Portal runtime error. An exception occurred while processing your request. Send the exception ID to your portal administrator. Exception ID: 02:

  • Process Triggers for USR_PASSWORD

    Hi All, I have wriiten a custom code to update a field when the user password in OIM is changed. I have created an Xellerate User Process Task and mapped it as decode against "USR_PASSWORD" in the lookup table - Lookup.USR_PROCESS_TRIGGERS. Also, I h

  • Aperture and Exporting and Compression (and iPhoto)

    Hello All... I recently imported an aperture project into iPhoto to create a book for a friend. In aperture, the the photos appears as 1536px x 1024px - i.e. perfectly big enough to create a 6" x 8" softback book. However, after the import, some pics