Tuesday, January 22, 2008

Automating alarm to play iTunes Music

I was talking to my buddy Justin yesterday. During the conversation a Mac application that allows you to set an alarm and play music from iTunes came up. I was sort of amazed that there is "for purchase" application out to do such a simple task. My thought was that this could be easily done for free on the Mac. My guess was that it would take less than 5 minutes to create something to do this function (either with Automator or Applescript). Well, it is just that easy to do with Automator and iCal. Here are the steps.

1. Start up Automator. Choose "Custom" workflow.

2. Select "Music" in the left hand pane.

3. Set "Get Specified iTunes Items" as you first workflow item.
a. Drag "Get Specified iTunes Items" into the right pane.
b. Click the "add" button and select your desired playlist.

4. Set "Play iTunes Playlist" as your next workflow item.
a. Drag "Play iTunes Playlist" to the right pane.

5. Save you automator workflow as a plug-in.
a. Select menu File->Save as Plug-in.
b. Give you plug in a name. Example "Play xxx Playlist"
c. Select "iCal Alarm" in the "Plug-in for" dropdown.
d. Select the "Save" button.

6. This will automatically start up iCal and make an event in the current day. Simply set the "from" time to your desire alarm time.

For future music alarms you can either change the date/time of the event you use or create a new event.

If you create a new event:
1. Create a new iCal event as normal.

2. Set the "Alarm" type to "open file"

3. In the field right under open file set your file to "Play xxx Playlist.app" (or whatever you named it).
a. Your automator app will be stored in your user folder under Library/Workflows/Applications/iCal/ .

Try it. While the instructions sound like more, this is a very easy to do automator script.
Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?