Numbers and Apple script

Discussion in 'Mac Programming' started by Tech198, Feb 4, 2016.

  1. Tech198 macrumors G4

    Joined:
    Mar 21, 2011
    Location:
    Australia, Perth
    #1
    How do u read cell value as text in Apple script.. ?

    I have a bunch of songs and have the same songs in Numbers... (track, song name and other meta-data..)

    I want to use Apple script to pass cell data and open iTunes with cosponsoring songname to place the value in the said fields.

    the columns are all there in Numbers,, i just need to read them... I'm guessing i'll need to read row to match song name then go from there.. however i can't even read cell data as text yet..


    Looks my programming may need a bit of work..
     
  2. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #2
    Hi,

    Something like this:

    Code:
    tell application "Numbers"
       tell its document "Untitled.numbers"
           tell its sheet "Sheet 1"
               tell its table "Table 1"
                   set theCellValue to formatted value of cell "B2"
               end tell
           end tell
       end tell
    end tell
    

    ...obviously substituting your own values for document, sheet, table and cell!

    Good luck!
     

Share This Page