Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Applescript > Adding alarm to...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1544 of 1611
Post > Topic >>

Adding alarm to iCal event

by Chris Schram <schram@[EMAIL PROTECTED] > Dec 1, 2007 at 08:23 PM

I export data from Mr. Tides to iCal. I would like to add alarms to two
kinds of events. iCal's dictionary suggests this is possible, but when I
ask for an event's properties, there is nothing about alarms. The
following script fails with the error messages indicated in -- comments.

I'm trying to do this script under Leopard, and I'm wondering if this is
yet another example of half-baked scriptability in this new Mac OS.

tell application "iCal"
 activate
 tell calendar "Port Orford Tides"
  set sunriseEvents to events whose summary contains "Sunrise"
  repeat with thisEvent in sunriseEvents
   tell thisEvent
    make new open file alarm with properties
{filepath:"/Applications/Mail.app", trigger interval:-30}
    -- "iCal got an error: AppleEvent handler failed."
   end tell
  end repeat
  set sunsetEvents to events whose summary contains "Sunset"
  repeat with thisEvent in sunsetEvents
   tell thisEvent
    make new sound alarm with properties {sound name:"Basso", trigger
interval:30}
    -- "iCal got an error: AppleEvent handler failed."
   end tell
  end repeat
 end tell
end tell
-- 
schram@[EMAIL PROTECTED]
 is a filtered spam magnet. Email replies may get lost.
Try <http://public.xdi.org/=chris.schram>
instead.

-- 
Posted via a free Usenet account from http://www.teranews.com




 1 Posts in Topic:
Adding alarm to iCal event
Chris Schram <schram@[  2007-12-01 20:23:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 16:54:30 CDT 2008.