Automating with Calendar in Mountain Lion and Mavericks

Most of you know that I’m big into automating things. I’ve written before about triggering recording from calendar events—it’s something I’ve been doing for a few years. However, I recently hit a snag with that process. I picked up a new-ish MacPro for video capture. After installing Mountain Lion on it, I used Migration Assistant to move the user profile over from the old machine. So far so good. At least until Sunday.

Changes to what you can launch from Calendar events started in 10.8.

It turns out that due to security concerns, you can no longer launch AppleScripts directly from a calendar event. Starting with Mountain Lion, and continuing in Mavericks, you have to handle this a little differently. Thankfully, it’s not that hard. Instead of calling an AppleScript directly, we use Automator to fire it for us.


Step 1: Create a Calendar Alarm in Automator

Even if you want to run an AppleScript, you have to use Automator. Thankfully, it’s easy to compile an AppleScript to work in an Automator Action. Launch Automator, select, “New” and click on the Calendar Alarm icon to start that workflow type.

Step 2: Run AppleScript

From the list of actions, choose “Run AppleScript.” Drag it into your workflow. Your script will vary, but here is the one I use to trigger capture with Blackmagic’s Media Express.

tell application "Blackmagic Media Express"
end tell

tell application "System Events"
keystroke "r" using {command down}
end tell

Step 3: Save the Action, Edit the Calendar Event

Once the Automator action is saved, it will create an event in Calendar. It creates a new calendar called Automator, and places an event for the time you created your action. I edited mine to trigger recording at 8:59 AM and 10:59 AM every Sunday (two events, just Option-Drag to duplicate it). 

Screen Shot 2014-01-05 at 8.25.09 PM.jpg

That’s it! It’s really quite easy. I recommend testing this a few times prior to Sunday. I had to play around with it a little bit to get it working, but once I did, it goes fine. There also seems to be a little lag between the time the clock strikes 8:59 and when the script fires, so give it a minute before concluding it’s not working. You’ll never miss the start of the service again!

Gear Techs

Today's post is brought to you by Heil Sound. Established in 1966, Heil Sound Ltd. has developed many professional audio innovations over the years, and is currently a world leader in the design and manufacture of large diaphragm dynamic, professional grade microphones for live sound, broadcast and recording.