1

Is there a way to have iTunes automatically start playing the iTunes DJ playlist when it starts?

1 Answer 1

3

There is usually no nice, clean, built-in way to hook into (or be notified of) a particular application's launch. But it is easy to combine launching iTunes and starting a playlist in an AppleScript program:

tell application "iTunes"
    play playlist "iTunes DJ"
end tell

iTunes will automatically launch if it was not already running, then it will start playing the playlist.

Paste the code into an empty AppleScript Editor (Script Editor prior to 10.6) document.

  • To use it from a AppleScript-capable launcher (the built-in script menu, Quicksilver, FastScripts, LaunchBar, etc.), save it as a “script” somewhere (usually) under ~/Library/Scripts (your launcher may have a preferred location).

    You might even be able to find a launcher or utility that can automatically run this AppleScript program every time iTunes is launched (I have never used it, but maybe Linked Applications Launcher could do this).

  • To use it from Finder, the dock, or an application-only launcher, save it as an “Application” (“application bundle” prior to 10.6) and put it wherever you find it convenient. To start the playlist just launch the saved ‘applet’ like a normal application (click in the dock, double-click in Finder, etc.).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .