Help with AppleScripting.
Hi Fellow Numbers Users,
I am new to AppleScripting. I was following this discussion:
and had a try. Because we were getting off the topic, I have started this new discussion on scripting for newbies.
Here is the error message in AppleScript Editor:
After clicking on OK, the editor highlighted the script like this:
For more clarity, here is the script I tried in AppleScript Editor, while running Numbers 3.2 (the only version of Numbers running at the time).
--converts string from dd/mm/yyyy to yyyy-mm-dd
tell application "Numbers" to tell front document to tell active sheet to tell (first table whose class of selection range is range)
tell selection range to repeat with aCell in cells
set aValue to value of aCell
set myDay to text 1 thru 2 of aValue
set myMonth to text 4 thru 5 of aValue
set myYear to text 7 thru 10 of aValue
set value of aCell to myYear & "-" & myMonth & "-" & myDay
set format to date and time
end repeat
end tell
--end script
I hope I have given sufficient detail.
Regards,
Ian
MacBook Pro (13-inch Mid 2012), OS X Mavericks (10.9.2), Pages 4.3, Numbers 2.3, Numbers 3.2