Re: ical todo notes
Re: ical todo notes
- Subject: Re: ical todo notes
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 24 Nov 2003 15:45:21 -0800
Actually, it's our mistake, not iCal's. For some reason, your making all you
variables as string instead of as the proper data type. 'trigger interval'
should be integer -15, not string "-15". When you throw a string at it it
just ignores you and uses the default which must be -5. Similarly you used
strings instead of dates for start date and end date, so it just made the
current time the default start and end dates, I hadn't noticed until now.
OK, the following will do what you want with no errors, and I apologize to
iCal. (Although you still can't get 'sound alarm 1' or item 1 of every sound
alarm, or anything much for attendee, so all that still stands.)
set StartDate to date "11/24/2003 9:00 AM"
set enddate to date "11/24/2003 10:00 AM"
set alarmTrigger to -15
set soundName to "Sosumi"
tell application "iCal"
set newEvent to make new event at end of calendar 1 with properties
{summary:"hello", start date:StartDate, end date:enddate}
tell newEvent
make new sound alarm at end of sound alarms with properties {trigger
interval:alarmTrigger, sound name:soundName}
end tell
--
Paul Berkowitz
>
From: "Dr. Max Bonilla" <email@hidden>
>
Date: Mon, 24 Nov 2003 16:43:58 -0500
>
To: AppleScript Users <email@hidden>
>
Subject: Re: ical todo notes
>
>
The variable alarmTrigger below set an alarm 5 minutes prior to the event,
>
not 15. Does that happen to you?
>
>
Max
>
>
On 11/24/03 3:26 PM, "Paul Berkowitz" <email@hidden> wrote:
>
>
> No. alarms are not properties, they're elements. You have to make them after
>
> the event exists:
>
>
>
> set StartDate to "11/24/2003 9:00 AM"
>
> set enddate to "11/24/2003 10:00 AM"
>
> set alarmTrigger to "-15"
>
> set soundName to "Sosumi"
>
>
>
>
>
> tell application "iCal"
>
> set newEvent to make new event at end of calendar 3 with properties
>
> {summary:"hello", start date:StartDate, end date:enddate}
>
> tell newEvent
>
> make new sound alarm at end of sound alarms with properties {trigger
>
> interval:alarmTrigger, sound name:soundName}
>
> end tell
>
> end tell
>
>
>
> That works fine.
>
>
>
> Unfortunately, there's no 'email' property of 'mail alarm'. I've figured out
>
> that the mail alarm always gets made for the email address which is at the
>
> top of the list of email addresses for your 'My Card' in Address Book. That
>
> is always the first Work email there. So you need to change that if it's not
>
> the email address you want.
>
>
>
> I've discovered the worst cesspool in iCal: it's 'attendees'. So are so many
>
> bugs, and they're so bad, it's almost unusable. More later.
>
_______________________________________________
>
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.
_______________________________________________
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.