Keyboard Shortcuts for AppleScripts: An iTunes Power Tip for Mac Users

Note: The behaviors described below are from Mac OS X 10.4.10. Previous versions of the OS might not behave as described. YMMV.

Keyboard shortcuts are the life-blood of the power user. Casual users know of the basic ones: Command-Q to quit, Command-W to close a window, Command-F to find, etc, but the power users have them all memorized for every program they use. For them, actions that would take 3-5 seconds of arduous mouse work can be accomplished in as little as half a second of keyboarding. That’s up to a 10x increase in productivity! Heck, many individuals, myself included, can go for minutes without even touching the mouse.

But even the most vaunted power user might not know this trick.

Mac OS X (both Panther and Tiger) has a little-promoted feature that lets you customize some of those keyboard shortcuts for menu items. Even some global commands can be changed to suit your tastes. Don’t like Command-P to Print? Change it. You can even make it an F-Key and return some functionality to your keyboard’s top row. In some cases, you can give shortcuts to menu items that don’t have one.

There are some caveats however:

  • When entering your new keyboard shortcut, you must make sure you type the Menu Item exactly as it appears in the Menu. Same spelling, capitalization and punctuation. Many menu commands end with an ellipsis, which you can type by pressing Option-; (semi-colon).
  • Also, if you choose a key combo that already exists, in most cases, the new one will replace the old one, leaving the original without a shortcut. Some programs will assign the duplicate shortcut, but it just won’t work.
  • Finally, there are apps that will not be affected by the changes you make. Photoshop, for one, uses its own internal shortcut customization scheme and won’t recognize anything you change in System Preferences.

So, having said all that, let’s apply it to iTunes.

The Macintosh version of iTunes, as you may well know, can extend its capabilities via AppleScripts, those little bundles of code that help with repetitive tasks, make organizing easier and add new features. A new Scripts Menu will appear in the Menu Bar when AppleScripts are installed script menu. If you’re reading an article on how to add a keyboard shortcut to them, you probably already know this. The beauty is that the system treats the Scripts Menu just like any other and you can add a keyboard shortcut to any script you have installed.

Identify Scripts

The Scripts Menu before

Start by opening iTunes. Click on the Scripts Menu and determine which scripts you want to add shortcuts to. Note their names as they appear in the drop-down. For this example, I’m selecting a Script called Embed Artwork. It copies album art downloaded from the iTunes Store into the individual music files; iTunes doesn’t do that by default, so I end up using it pretty frequently. I’ll also do Quick Convert, since I often use it to convert podcasts into audiobooks for faster listening.

Apply the Shortcuts

adding keyboard shortcuts to itunes

Open System Preferences. Select Keyboard & Mouse, then Keyboard Shortcuts. Click the + (plus) sign in the lower left, then select iTunes from the Applications pop-up. In the Menu Title field, enter the name of the script. In the Keyboard Shortcut field, press the key combo you wish to use. For Embed Artwork, I’m choosing Command-F1, Quick Convert gets Command-F2. A modifier key is required in iTunes. Stand-alone F-Keys, for whatever reason, will show up in the menu but they won’t do anything when pressed. When you’re satisfied, press Add to save.

Relaunch iTunes

The Scripts Menu after editing keyboard shortcuts

iTunes loads the keyboard shortcuts when it is launched, so quit and reopen it. When you click the Scripts Menu, you’ll see your new shortcuts displayed next to your script titles.

It is important to remember that configuring keyboard shortcuts, in general, is an inexact process. If something doesn’t work, find an alternative. I know I would love to use those F-Keys in iTunes. but for now, I’ll have to settle for the workaround. Still, these added functions will be a boon to anyone’s productivity.

Magnetosphere: Awesome iTunes Visualizer

One of the lesser-used features of iTunes is its visualizer, the colorful animated display that accompanies any music that’s playing. The visuals are a fun little distraction, but once the novelty wears off, the usefulness of the function tends to be limited. Though, in college, a PowerBook and an LCD projector made for a pretty rockin portable party system.

g-force shot
Ol’ trusty G-Force

iTunes, from version 1.0, has shipped with a default visualizer: G-Force, which was originally a plugin for SoundJam (the app that iTunes was initially derived from). It was groundbreaking at the time of its release and it still has some appeal, but at seven years old with no major updates, the plugin shows its age.

Enter Magnetosphere, a brand-new visualizer that was recently released as a beta. It’s not the first third-party visualizer, but it is the best one I’ve seen yet.

Magnetosphere features excellent music response, smooth animation (even on my aging G4 PowerBook), a variety of visual themes, and best of all, lots of pretty colors. One could stare at it for hours (assuming they have nothing productive to be doing with their time) and I’m even tempted to throw a party just to show it off.

This thing is awesome, but don’t take my word for it. Here’s a video I made of it in action:

Magnetosphere, iTunes plugin, in action

The best part starts around 1:50, but really, just watch the whole thing. And if at all you’re curious, the song is Nostrand, the sleeper hit from Ratatat’s Classics.

Download Magnetosphere from Barbarian Software. Mac OS X and Windows versions available. Requires iTunes of course.

Update 5 Sept 08: There’s a rumor going around that the Magnetosphere visualizer will be included with the also-rumored iTunes 8, which itself is rumored to be released mid-September 2008.

Update 9 Sept 08: Yep, looks like the rumor mill had it right. Magenetosphere is now a part of iTunes by default, as of version 8, which is available for download from Apple.

Migrate Your iTunes Library from Windows to Mac (and keep your ratings, play counts and date added)

Note: This article was written with iTunes 7 in mind. However, the principle holds for moving comparable versions (ie iTunes 6 Win to iTunes 6 mac) or for moving upstream (iTunes 6 to iTunes 7). Also, the procedure should work for moving your iTunes library from one computer to another, Mac-to-Mac, PC-to-PC, or any combination of the two. You can even use this method to clone an iTunes library from one computer to many others.

windows iTunes migration
Apple’s market share has been growing dramatically. Many observers attribute that growth to the introduction of the Intel-based Macintosh as well as the so-called “halo effect” of the iTunes-iPod phenomenon. If you’re one of those users who have made the switch from Windows to Mac OS X because of said halo then you probably have already established an iTunes Library (with valuable hours spent creating playlists, rating songs and increasing play counts).

It would be a shame to lose all that hard work and data when switching platforms. Fortunately, it is a rather simple* procedure to move all your music to your new Mac while preserving all that precious, gooey metadata. Some guides say to export your existing library to XML and re-import it one the new machine. But that’s a bit complicated and it doesn’t really work. Since both the Mac and Windows versions of iTunes use the same file format for the library file, all you need to do is copy the library files from one computer to the other, while making sure iTunes doesn’t forget where the songs are located.

Continue reading