Sto cercando di ottenere i dati da una tabella in Numbers. Ho un numero di indice, ho bisogno di ottenere il nome associato con esso in applescript. (Alla fine ho bisogno di impostare i nomi dei file con una delle colonne di questo foglio numerico)
ecco cosa ho ottenuto:
tell application "iTunes"
repeat with theTrack in selection
set theFile to location of theTrack
tell application "Finder" to set theName to name of theFile
set surahNameAsString to characters 1 thru 3 of theName as text
--set album of theTrack to surahName
set surahNumber to surahNameAsString as integer
log ("here")
set aName to my getAName(surahNumber)
--set the year of theTrack to 1985
end repeat
end tell
on getAName(surahNumber)
tell application "Numbers"
activate
set t to front document's active sheet's first table's cell whose value is surahNumber
--set t to front document's active sheet's first table's first column
repeat with c in t
set theValue to c's value
end repeat
end tell
return theValue
end getAName