Graphics & design software

10 AppleScripts for iTunes

AppleScripting is a powerful way to automate repetitive (and often tedious) tasks on the Mac. Once you start using a good script, you’ll wonder how you ever lived without it. The good news is that you don’t have to know how to write scripts in order to take advantage of them. There are tons of AppleScripts on the Web (most of them free downloads), and quite a few of them are for iTunes.

If you’re an iTunes user who hasn’t yet jumped on the AppleScript train, now’s a great time to climb aboard. To start you off, I asked Doug Adams—who runs the Web site Doug’s AppleScripts for iTunes )—to offer his top picks from the more than 300 scripts on his site. All the scripts listed here have been certified to work with the latest version of iTunes in Tiger (OS X 10.4). (You can download a zip archive of all the scripts described here, or visit Doug’s site to download these and other scripts.)

Once you download a script, you’ll need to install it to make it work in iTunes. Quit iTunes if it’s running, and drop your script in / your user folder / Library/iTunes/Scripts. If this is your first foray into iTunes scripts, you’ll need to create a Scripts folder (or just download the set and drop the resulting Scripts folder in the right place). Then relaunch iTunes, and you’ll find that you can access your scripts by clicking on the script icon in the menu bar (between the Window and Help items).

1. I Hate That iTunes Done Chime!

If you’re sick of the standard Done chime that iTunes plays after importing files (or after running some of the import or convert scripts described later in this article), you’re in luck. This applet lets you choose one of OS X’s built-in sounds, select any AIFF file on your Mac, or turn off the chime altogether (see top screenshot). To launch it, you double-click on it instead of selecting it via the Script menu.

2. Find Album Artwork with Google

When you buy a music track from the iTunes Music Store, the file contains embedded album art. But for any music you’ve ripped from your own CD collection, you’ll have to add cover art yourself. This script uses a selected track’s album and song title to search (via Google’s Images page) for artwork. You can then manually drag the artwork to a song or group of songs in iTunes to add it.

3. Export Artwork to iPhoto

If you’d like to keep a collection of your tracks’ cover art handy, this script will export the artwork of the selected tracks or a selected playlist to a new album in iPhoto 5 called My iTunes Artwork (see middle screenshot).

4. Make Bookmarkable

Audiobooks are bookmarkable—that is, they remember where you stopped playing them; when you return, they pick up at the same spot. If you’d like similar functionality with other files, this script makes any AAC track bookmarkable by changing its file type to M4B. Bookmarking can be particularly useful for long songs, captured streams, or Podcasts (as long as they’re AAC files).

5. Tracks without Artwork to Playlist

Want to add artwork to your tracks but don’t know which ones are missing art? This script scans any selected tracks, playlist, or library, and adds items that don’t have artwork to a new playlist named No Art. You can then add the artwork manually (the Find Album Artwork with Google script can help here).

6. Google Lyric Search

Did the Beatles really sing “A girl with colitis goes by” in “ Lucy in the Sky with Diamonds” ? Find out with this simple script, which searches for song lyrics by submitting the name and artist of the selected or currently playing track (along with the word lyric ) to Google, using your default browser.

7. This Tag, That Tag Scripts

With convenient online databases, you no longer have to enter tag information by hand every time you rip a new CD. But the information you get on the Web isn’t always right, and sometimes tags get switched or you want to tweak something. These four scripts help you swap and copy data between, and append and prepend data to, tags in iTunes.

8. Quick Convert

Say you have iTunes set to rip songs as AAC files, but you occasionally want to import songs as Apple Lossless files or convert a file to AIFF. This script lets you rip songs from a CD or convert tracks in your library (to a new playlist), using your choice of available encoders, without having to open the iTunes Importing pane (see bottom screenshot). After iTunes finishes encoding tracks, the script restores the default encoder you’ve set in iTunes’ preferences.

9. Rip to iPod

Don’t care about keeping songs in your iTunes library—just want your music on your iPod? Then this is the script for you. Run it to rip a CD with your choice of encoder, copy the tracks to your iPod, and then delete and remove them from your iTunes library. It’s the closest thing to seamless CD-to-iPod importing.

10. Import iPod Audio Files

Need to copy tracks from your iPod to your PowerBook’s iTunes Library? This script adds songs to your Music folder just as if you were ripping them from CDs locally, and it will even create a new playlist for your imported songs if you want. The included ProgBar application (which also goes in the Scripts folder) shows the download status. (Note that you’ll need to have your iPod in the manual-update mode to use this script.)

Jonathan Seff is Macworld’s senior news editor—and a firm believer in the power of AppleScript.

Change—or disable—the chime that iTunes sounds when it finishes encoding.Easily send album art to a special album in iPhoto 5.Temporarily change iTunes’ encoder without altering its preferences.

Subscribe to the Apple @ Work Newsletter

Comments