iCal summary of repeated events

I am trying to write a script that will control iTunes based on iCal event names. Similar to iCal calling iTunes but with some customized features that I need. The problem is that Applescript can’t seem to get the summary of events that are repeated instances of a past event. Works great when the original event is a current event, but not when subsequent repetitions are current :frowning: I get “The variable plylst is not defined.” Not sure how to make Applescript “see” an event repetition.

Thanks for any help!

Tom

Here is the section in question…

set current_date to current date

tell application "iCal"
	activate
	set plylst to the summary of the first event of calendar "iTunes" whose start date is less than or equal to current_date and end date is greater than or equal to current_date

end tell

Hi brattom,

That’s the main problem with reading iCal events. recurrence events do not apply. If the recurrence event is simple and has a pattern, then you may look at the recurrence string and use it to get all events following the original event. You would get those that fall on the current date.

Your best bet would be to run a script from iCal that scripts iTunes.

gl,