Last week I posted about how I used an Automator action triggered by an iCal event to automatically relaunch iTunes once a day. Unfortunately, due to some wonkyness (I believe that's the technical term) with iTunes I find that if I don't regularly relaunch the application it will lose the connection with my Apple TV and cause a problem when I try to access content. The post generated a lot of positive feedback so this week I thought I show how the same task can be accomplished using Keyboard Maestro. We discussed Keyboard Maestro at length on MPU 145 and since then I'm finding more and more uses for the application. If this post is well received I may post more of my Keyboard Maestro workflows here.
Create a new Macro triggered by time
The first step is to create a new Macro triggered by time. In this case I'm going to have my Macro run each day at 5:30 a.m.
Add the Quit and Relaunch Action
Keyboard Maestro has a Quit and Relaunch action that is a subset of the Quit a specific Application Action, which means we can shorten the steps of our macro to one. Drag over the Quit a Specific Application Action into your workflow and choose iTunes (or your App of choice) from the list of Applications. Instead of simply quitting the application, you can choose Quit and Relaunch from the drop-down menu of options.
There Is No Step Three
Keyboard Maestro simplifies the steps and doesn't require adding events to your calendar as with the Automator action. However, Keyboard Maestro is a third party App that costs $36.00 (upgrade from previous versions available) whereas Automator is free and built into the OS.
So long as keyboard Maestro is running and your computer is logged in at the specified time, it will Quit and Relaunch iTunes. To make sure Keyboard Maestro is always running and can execute actions, I suggest you configure the Keyboard Maestro Engine to launch at startup in the Keyboard Maestro preferences.
One of the bonuses of Keyboard Maestro is that you can enable a web server for remote access to your Keyboard Maestro widgets. (I suggest you setup strong security measures if you do this). This means with the accompanying iPhone App you can run Macros manually from your iPhone. So, let's say I sat down on my couch to stream a movie from my iTunes library but found that for whatever reason it lost connection and wouldn't play. Rather than having to remote access into my Mac and restart iTunes or dig around for my keyboard and mouse, I can manually trigger my Keyboard Maestro Macro from my iPhone, right from the couch.