Re: create duplicate event in iCal -- or repeating event every 3 hours
Re: create duplicate event in iCal -- or repeating event every 3 hours
- Subject: Re: create duplicate event in iCal -- or repeating event every 3 hours
- From: "Nigel Garvey" <email@hidden>
- Date: Sat, 25 Oct 2008 13:50:32 +0100
"Jackson Harvell" wrote on Fri, 24 Oct 2008 11:05:55 -0400:
>I am trying to create a script which will create an event in ical with
>a sound alarm, and then repeat the event 3 hours for a total of 3
>times.
>
>when i use this script, ical creates the event and alarm, but instead
>of duplicating the event, it moves it to the time of the 2nd repeat.
According to iCal's dictionary, its 'duplicate' command requires a
destination parameter, but I'm getting same result as you even when
specifying the end of the original calendar as such. The most reliable
solution seems to be to create each event from scratch:
set startDate to (current date)
repeat 3 times
tell application "iCal"
set theEvent to make new event at end of calendar "myCal" with
properties {summary:"reminder", description:"reminder", start
date:startDate, end date:startDate + 15 * minutes}
tell theEvent
make new sound alarm at end with properties {trigger interval:0}
end tell
end tell
set startDate to startDate + 3 * hours
end repeat
If iCal supported recurrences of less than a day, you'd be able use a
single event with a 'recurrence' value of "FREQ=HOURLY;INTERVAL=3;COUNT=3".
NG
_______________________________________________
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