Make an iCal event run an AppleScript
Having read the entry on creating a
No doubt there are smarter ways to do this, but my method is outlined after the jump.
First, you need to make sure that the script you want to run is not saved as a stand-alone app. iCal can’t run scripts saved as apps. So in this case, when you load up Zak’s script into Script Editor, make sure that it is saved as a script (with the “scpt” extension).
Or Command-Click on the file on Zak’s site, select the “Download linked file” option. Start TextExit. Drag the saved file onto TextEdit and then select File > Save As… and save it somewhere memorable as GTDMail.scpt.
Now, create an event in iCal at the time that you would like to run the script. I do mine at 9 am. If I get to work before then, I let myself goof off and do some blogging.
You might be an early bird. Or more disciplined. Pick the time that suits.
Then you need to modify the event’s setting a bit in the drawer on the right.
In the repeat section, set it to run daily and to never end. Assign it to the right calendar.
Then in the alarm section, select the “Run script” option. Select “Other…” and navigate to the location in which you have saved the script. My GTDMail.scpt is stored in my Home Directory in ~/Library/Scripts/Applications/Mail to keep things neat and tidy.
If you have it saved as an app you will see it there, but greyed out. Go back to the start and make sure that you have it saved as a script.
When you are done, the details for the whole event should look like this.

And in your iCal window you will see a relentless procession of repeated events, each one ready to serve up the contents of the Tickler file for the day:

The line also serves as a useful visual reminder that it is time to start work!
You’re done.
There are other ways to do this too. Every morning I get an email of BBC news headlines at 8 am. I could create a rule in
Oh, well. At least you now have the general idea and will be able to set up the Mail rule easily by selecting “run AppleScript” from the “Actions to be performed” section.
Tags: applescript, gtd, iCal, mail.app, TicklerRelated posts

December 9th, 2005 at 2:35 pm
If you select “Open File” instead of “Run Script”, you can run any application (and thus also scripts saved as a application).