You are here

Automate Listening to Online Radio Shows on a Mac Using iTunes

Submitted by Thinking CAP on Sun, Dec 20, 2009 - 5:04 pm

iTunes window small Here are some quick directions for how you can have your Apple Mac automatically "tune in" over the Internet to Cultural Baggage and Century of Lies, Reverend Dean Becker's weekly radio shows. There are a number of ways to accomplish this, but I will show you the easiest way using the software already on your computer; there are only two main steps!

Our Goal

One minute before the show starts, iTunes slowly fades the volume of whatever you're listening to, then connects to Dean's radio station on the Internet, starts playing, and slowly brings the volume back up to where it had been. (In addition to — or instead of — listening on your computer, you can use an AirPort Express to have iTunes play through your stereo system.)

If iTunes is not open, for example you're not listening to it, then iTunes will open automatically for you.

(If your computer is turned off, or asleep, it will stay turned off or stay asleep; you will need to turn it on first. However, there is a method to automate this too if you'd like. Apple Menu -> System Preferences -> Energy Saver -> Schedule, then set the time to start up (or wake up) 5 or so minutes before the show.)



  • Apple Mac
  • Internet Connection, which you probably already have if you are reading this web page on the Internet. :-)
  • iTunes, which comes installed by default.
  • iCal, which comes installed by default.
  • AppleScript, which comes installed by default.

1. The AppleScript Which Does the Automation

I have already made an AppleScript that does everything you need. Just download the disk image and the script is provided in two different formats.

  1. AppleScript The application (.app) which is all set up for you. Just copy it off the disk image and put it where you want, make sure you know where you put it, you need to locate it using iCal in the next step. If you do this, click this link, or scroll down to "2. Configure iCal to Open the Script at the Right Time."
  2. The download also contains the AppleScript in plain text format, so you can inspect it easily. If you followed this method, see the next section "Roll Your Own," and pick up at step 4.

Roll Your Own

Script Editor icon If you do not want to download the disk image, but prefer to create the AppleScript yourself, I provide the entire script on this page.

  1. Open the AppleScript "Script Editor." You can use Spotlight or Find to locate it. When it opens you will have a new window.
  2. Copy the entire script which is on this page, then hit the "back" button and come back here.
  3. Paste the script in the Script Editor window.
  4. Script Editor Compile button At the top of the window is a "Compile" button, if you click it, the syntax of the script will be verified, to make sure you copied/pasted the whole thing in correctly.
  5. Now you will save it. File -> Save As… then pick a name for it, save it in a location that makes sense to you, and from the "File Format" pop-up menu choose "application bundle." (Leave "Run Only," "Startup Screen," and "Stay Open" unchecked.)

Good job! That was the hard part, the next part is much easier.

2. Configure iCal to Open the Script at the Right Time

  1. Script Editor Compile button Learn the time the radio shows start in your time zone. Just go to Dean's website and at the top of the page he's kindly posted the time the shows start in the Central Time Zone, aka Central Standard Time (CST).
  2. Open iCal, choose a calendar to add the event to (click a calendar in the top left of the window).
  3. Add an event. File -> New Event. A new event will be added to whatever day and time you are in right now.
  4. Use the "info" inspector (the "i" button at the bottom of the window shows and hides it) to customize the event properties. Set the day the show is live, currently Sunday. Set the time the show comes on, currently 6:30 CST (adjust to your time zone). Set the repeat field to every week.
  5. In the alarm field pop up the menu "none" and choose "Open file." "iCal" will be the default, but click on that to show the pop-up menu and choose "Other…" then locate the AppleScript you created (or copied off the disk image you downloaded). Next you can choose when you wish the script to run before the show starts. Just click in the field with the number and set it to 1 minute before.

3. Test It!

Since the only way to figure out if it works is to wait for the time of the week to roll around there are a few options to make sure things are working properly before then. You can perform both these tests to make sure both aspects of the setup work.

  1. Double click the AppleScript from the first part of the directions. It should run and cause iTunes to connect to the radio station Dean broadcasts from,
  2. Create a new event that's just a few minutes from now that triggers the AppleScript to run. This will (mostly) test if you've configured iCal properly.


Ta Da! You're Done!

Now (assuming you've configured the time zone offset properly) the next time the Drug Truth Network broadcasts live over the Internet, iTunes will open up and tune in to it for you automatically.

It's possible there could be problems. Just last week I could not connect to the KPFT servers. I'm not sure why, perhaps they were being attacked or perhaps they were overloaded.

Other problems could arise, so feel free to leave comments below and I can try to help you.

But the good news is there are podcasts of each show which you can download and listen to even if you could not catch the show live. Just look in the upper right-hand corner of every page on this website and you will see "Drug Truth Network Podcasts." If you have iTunes just click each iTunes link and iTunes will automatically subscribe to them, downloading them when they become available.

So easy, so educational.

icon | Century of Lies
icon | Cultural Baggage
icon | 4:20 Drug War News