Re: iCal question
Re: iCal question
- Subject: Re: iCal question
- From: David Hanauer <email@hidden>
- Date: Mon, 24 Nov 2003 10:07:23 -0500
Paul,
Thanks for your reply.
Are you in Panther? Some things to do with lists were
improved in AS 1.9.2.
I am using Jaguar 10.2.8 and the Script Editor 1.9 and iCal 1.5.1.
As for the code you suggested, I had to change the "start time" part
to "start date" since the editor didn't seem to recognize "start
time" in relation to the event. I'm not sure why.
It seems to work for events that only occur on a single day, but what
I want is to find events that are occurring within, for example, the
next 10 days, but are actually recurring events. Thus, the official
start times or dates of these events could have been several years
ago but I am interested in knowing if they will recur again on a
specific day or date range. Does that make sense? I know it is
possible to obtain the recurrence data for an event, but then it
becomes necessary to do a _lot_ of work to find out if the event is
occurring on the dates in which I am interested. It would be great
if iCal could do that work for me, but I'm not sure if it does.
Thanks.
Dave H.
set midnightToday to date (date string of (current date))
set midnightYesterday to midnightToday - (1 * days)
set yesterdaysEvents to {}
tell app "iCal"
repeat with aCalendar in (every calendar)
set yesterdaysEvents to yesterdaysEvents & (every event of
aCalendar whose start time is greater than or equal to midnightYesterday and
start time is less than midnightToday )
end repeat
end tell
It's _extremely_ fast here.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.