If I know the id of an event, is there a simple way to determine the Calendar it belongs to? I want to retrieve properties of the selected event in iCal without caring what calendar the event belongs to.
I am aware of ways of doing this using CalendarLib, just wondering if there is a simpler way (see forum-latenightsw-com/t/how-do-i-get-selected-event-in-apple-calendar/2114/4 )
set defaultsReply to (do shell script "defaults read com.apple.ical SelectedEvents")
set localUIDs to {}
set {TID, text item delimiters} to {text item delimiters, quote}
set resultItems to text items of defaultsReply
set text item delimiters to TID
repeat with i from 1 to (count resultItems)
if i mod 2 = 0 then set end of localUIDs to resultItems's item i
end repeat
tell application id "com.apple.iCal" -- Calendar
set theProps to properties of event id (item 1 of localUIDs) of calendar "Work"
end tell