Get today's repeat event instances from iCal

Apologies if this has been posted before, but I didn’t find it on a Google search.

I’m trying to make a script that will pull a list of today’s events from iCal. I didn’t get very far, because it quickly became clear that a “get every event whose start date = (current date as string) from (calendars who writable is true)” phrase yielded only non-repeating events or repeating events which started on that day.

Is there any way to use Applescript to suck in repeating event instances as well? I can pull some horrid string which is some sort of repeat interval, but it’s fairly unparseable with li’l ol’ Applescript.

Model: Powerbook G4
Browser: Safari) OmniWeb/v563.60
Operating System: Mac OS X (10.4)

Wow… I can’t beleive there’s no day class that can return its events. Could they make it any harder? The problem is that the recurring event’s start date has already passed. If you wanted, I guess you can look at the event’s recurrence property and evaluate it. There are some Java classes that can return lists of dates for recurrence as in 4.3.10 in rfc2445, but that’s insane. I don’t see anything else useful in iLife v5. Maybe 6 is a little more robust?

There’s GOT to be an easier way… anyone?

Hi,

That’s the big problem with scripting iCal. I tried parsing the recurrence events before and it’s a big headache if you’re trying to catch all the different types. If your recurrence events are simple, then you can just look for these types. It’s been a while since I worked on it, so can’t remember what point I got up to.

gl,

I found a Konfabulator/Yahoo Widget (Today’s Schedule) and checked out the contained Applescript to figure out how it handled this. Yes, indeed, it just parses that recurrence string and then does some math to figure out if it falls on the day in question. Because of Applescript’s weaknesses in this arena, the script takes a few minutes to complete its work. Not good.

I’m sending some feedback to Apple about this. iCal’s scripting dictionary is fairly good, but being unable to just pull events or to-dos for a given day is apalling.

–Nik