iCal Recurring events
iCal Recurring events
- Subject: iCal Recurring events
- From: Gil Dawson <email@hidden>
- Date: Wed, 2 Dec 2009 12:20:29 -0800
Re: Mac OS X 10.4.11 (Tiger); iCal Version 2.0.5 (1069)
I'd like for my script to visit every event in a calendar for a time
period. The following script misses recurring events whose first
occurrence's start time is before the time period:
tell application "iCal"
set theCalendar to the first calendar whose name is "MCCV"
tell theCalendar
set CurrentEvents to the events whose ¬
((start date ≥ (current date)) and ¬
(start date ≤ ((current date) + 30 * days)))
repeat with anEvent in CurrentEvents
tell anEvent
log "Summary = " & summary
end tell
end repeat
end tell
end tell
On this point, Paul Berkowitz wrote, on 3/12/06 at 8:04 A
>To include those you'd also have to parse the recurrence strings
> of every recurring event beginning before the event you started
with. iCal
> _could_ do that for you (since it knows how to do it for the UI), but
> there's no AppleScript access to that operation other than parsing
> recurrence strings - something that would be extremely complex and
tedious.
I looked at RFC 2445 Section 4.8.5 to see what the recurrence strings
look like. Hoo Boy! Writing that code (and testing it!) would indeed
be extremely complex and tedious.
Has anyone scripted this? (Kudos if so!)
Or, perhaps, is there some model code somewhere that we could adapt?
--Gil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden