Ok, I’ve tried everything that I can think of and I cannot script the addition of an attendee to an event in iCal [version 1.5.1 on OS X 10.2.8]. As far as I can determine, this should work but it doesn’t. I’m approaching script rage!
set date_string to "11/7/03"
set due_date to date date_string
tell application "iCal"
set cal_ to first calendar whose title is "Home"
set new_event to make event at end of events of cal_ with properties ¬
{due date:due_date, summary:"Release secret application"}
tell new_event
make display alarm at end of display alarms with properties ¬
{trigger interval:-60}
make attendee at end of attendees with properties ¬
{display name:"Rob J.", email:"robj@woh.rr.com"}
end tell
end tell
It works right up to the ‘make attendee’ part. Any ideas or working code? All suggestions will be welcome and appreciated.
Thanks for confirming my suspicions, Jon. I hadn’t considered trying it that way. I wonder if Jaguar users will still be able to obtain updated versions of iCal. Oh well, I reckon I should file a bug report anyway.
You all did all of the work, I just noticed Jon’s comment “If the attendees hasn’t been initialized it fails.” and thought I’d try using “at beginning” instead of “at end” & voila!