January 27 2011 - 11:26 am

Create Shortcut Keys to Select Libraries

There are no shortcut keys to select the Music, Podcast, TV Shows, and other libraries. But you can use AppleScript to create some. Here's how:

What you'll end up doing is creating a small script for each of the libraries you'll want to access. Here's the script for the Music library:

tell application "iTunes"
		set view of front browser window to (get some playlist whose special kind is Music)
	end try
end tell

Some might suggest using this syntax instead:

		set view of front browser window to playlist "Music"

That's fine, too. I just prefer using special kind to avoid any ambiguity. Save that as "select_music.scpt" in your ~/Library/iTunes/Scripts/ folder so it will appear in the iTunes Script menu. Now, assign the script a "Command-1" keyboard shortcut.

I think you can see where this is going. You'll create a "select-movies.scpt" and assign it "Command-2", and so on. The special kind parameters for other libraries are Books, iTunes U, Movies, Podcasts, and TV Shows. For other libraries you may have to use the name parameter.

Site contents © 2001 - 2020 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Privacy.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
The one who says "it cannot be done" should not interrupt the one doing it.