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: "Jackson Harvell" <email@hidden>
- Date: Sat, 25 Oct 2008 12:39:36 -0400
a huge thank you for this.
i had also re-written the script to create 3 new events instead of
duplicating, but your example is much better.
another lesson for me is to be more like water with applescript, why
did i spend more than an hour trying to make `duplicate` work when i
could have just realized after a few minutes that it didn't work and
moved on? for some reason i have it in my head that duplicate is the
better approach, so i keep trying to make it work, then when it
doesn't work my confidence that i know *anything* about applescript
plunges.
thanks again
JH
On Sat, Oct 25, 2008 at 8:50 AM, Nigel Garvey
<email@hidden> wrote:
> "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