I'm trying to do a few operations on a selected event. But I can't
figure out how to reference it. The event is already made
I do this for a script I run over a selected To Do.
I fiddled it by issuing a copy command, then checking the contents of
the clipboard. The same hack should work for an event:
tell application id "com.apple.iCal" to activate
tell application id "com.apple.systemevents"
tell process "iCal"
keystroke "c" using command down
end tell
end tell
delay 1
set TimesheetSummary to first paragraph of (the clipboard)
-- Now we’ve got the summary from copying, find the ID the proper way
tell application id "com.apple.iCal"
tell calendar "Work"
set TimeSheets to every todo whose summary is TimesheetSummary
end tell
end tell