You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Execute an AppleScript via Calendar

by: 
Last modified: Aug 11, 2012 3:34 PM
1 19236 Last modified Aug 11, 2012 3:34 PM

Apple removed the ability to execute an AppleScript via an alert in Calendar on Mountain Lion:


User uploaded file



There are two ways to do it on Mountain Lion:




1. Save the AppleScript as an application:


Hold the Alt/Option key while selecting File in the AppleScript menubar. Select Save As. On that prompt, select Application for File Format:


User uploaded file


Then on the Calendar window, select the Open File option as in the sample above, then click the default of iCal below it to get a prompt where you can select the Application you saved above.






2. Use Apple's Automator app:


(This was developed by user LinuxGeek3447 and is posted here with permission.)


I use an AppleScript to provide an alarm clock function. Here's how I used Automator to allow execution of the script:


In Automator, create a Calendar Alarm:


User uploaded file


Select Utilities from the library pane, then select & drag Run AppleScript into the workflow area.


Copy/paste the desired AppleScript into the Run AppleScript box:


User uploaded file


Save the newly created Calendar Alarm. You'll be prompted for a name.


When you do that, OSX will create an Automator calendar automatically (if you don't already have one), and place an Event in it for the current date, with the name you used, etc. Double-click it to edit, then change/add the time, repeat instructions, etc., as necessary:


User uploaded file


If it doesn't, select Open FIle for the Alert, click the second line under it and select Other to get a prompt to locate the Automator alarm you created above.


Again, credit to user LinuxGeek3447for figuring this out.


Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.