iCal and recurring events

Hi eveybody,

I have the following problem: I am using iCal events to trigger AppleScripts, which create documents. Those AppleScripts need to find the iCal event that triggered them, because in the notes field of the event their is some configuration given about how the document is to be prepared.

Now the system works perfect as long as the event is not a so called recurring event…Because it seems that you cannot get them with AppleScript. If you create a new calendar with exactly one event with a recurrence of every week, then the following code will still only return one event…


tell application "iCal"
	tell calendar "Test"
		get every event
	end tell
end tell

Is there some kind of a workaround which does not include parsing the ics-files? :smiley: I would just love to get all events of a day INCLUDING the recurring events…

Thanks so much!

Martin

Hi Martin,

Take a look at this thread

Hope it helps

Hi Stefan,

Thanks a lot for your answer! Nigel really did a great job on this one. It must have been a lot of work…The code is amazing.

Still, I’d rather use your CLI version (for the speed). But of course it only works for Mac OS X 10.5 and higher and unfortunately I am bound to 10.4, because of the need of the Classic environment :frowning:

So now I decided not to use recurring events at all, but just create duplicates of an event by scripting.

P.S.: Does anybody know of a different calendar app that is able to trigger applescripts? :smiley: