Create an iTunes Genius playlist via keyboard shortcut

Aug 06, '09 07:30:03AM

Contributed by: MacTipper

Something Apple really messed up with in iTunes 8 is that there is no keyboard shortcut or menu item to create a Genius playlist. You can enable the feature via the menus, but to actually create a Genius playlist, you need to click the Genius button at the bottom of the main iTunes window. Despite much searching, I wasn't able to find a solution to this problem. Fortunately, I finally figured out how to automate activating Genius using an AppleScript.

tell application "iTunes"
 activate
 set the_song to the selection
 play item 1 of the selection
end tell
tell application "System Events"
 click button 3 of scroll area 1 of window "iTunes" of application process "iTunes"
end tell
The script will use the currently selected song (Command-L will select the currently-playing song) as the basis for your genius playlist. By combining this script with your favorite keyboard macro program (mine is Spark), you can activate Genius with a simple keyboard shortcut (I used Cmd-Option-G). This was originally posted in this entry on my blog.

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20090805072808180