Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

All I see in iCal's dictionary are display, mail, sound, and open file alarms.

Note: I know I can save the desired script as an app and create an open file alarm, but that would mean that the alarm would change focus to the app which for me is undesirable.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You don't have to save the script as an app, simply save it as an AppleScript file and it will run all the same. It won't steal focus if you do it this way. I have tested this and it works.

set theFile to "/Users/me/Desktop/myscript.scpt"
tell application "iCal"
   tell calendar "MyCalendar"
      set theDate to (current date) + 1 * minutes
      set theEvent to make new event at end with properties {summary:"it's a script!", description:"run the script", start date:theDate}
      tell theEvent
         make new open file alarm at end with properties {trigger date:theDate, filepath:theFile}
      end tell
   end tell
end tell
share|improve this answer
    
I assumed that would just open the file in the AppleScript Editor. I'll try it now. –  Orion751 Aug 8 '10 at 0:07
    
You're right! It automatically adjusted to a run script alarm. Thanks! –  Orion751 Aug 8 '10 at 17:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.