Re: iCal question
Re: iCal question
- Subject: Re: iCal question
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 23 Nov 2003 21:42:36 -0800
On 11/23/03 9:19 PM, "David Hanauer" <email@hidden> wrote:
>
Hi. I have several questions/issues regarding the latest version of iCal:
>
>
1) Is there any way to request only events that occur on a specific
>
day or within a range of dates? From what I've tried it seems that I
>
can only request all events from a calendar and then go through each
>
event to see if it is occurring on the day(s) for which I am
>
interested in obtaining information.
No. it's pretty good with whose clauses. You do have to loop through each
calendar, but you won't have too many of those:
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.
I'm using the verbose ' greater than or equal to' because of this
anti-AppleScript mail server configuration which will screw it up and
confuse you if I use the proper symbol (option-.)
>
>
2) I have also had a problem trying to obtain event information from
>
a very large calendar (> 1 MB in size). When I try to request every
>
event from the calendar using AppleScript I get an error. Can anyone
>
suggest a workaround or is this a limitation in AppleScript?
Oh-oh. That doesn't sound good. More wonkiness form the iApps. It's timing
out? Or stack overflow? I don't think there's any workaround for that. It's
probably a limitation of iCal's applescript implementation, not of
AppleScript itself. Are you in Panther? Some things to do with lists were
improved in AS 1.9.2.
--
Paul Berkowitz
_______________________________________________
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.