I write a lot about using AppleScripts with iTunes. Thanks to iTunes’ scriptability, it is possible to extend the app with numerous features and shortcuts. If not for Doug Adams, the master scripter and proprietor of Doug’s AppleScripts for iTunes, I would spend a lot more time managing my iTunes library.
I often mention AppleScripts in my Ask the iTunes Guy column over at Macworld, since Doug’s scripts make a lot of seemingly complicated maneuvers a matter of a few mouse clicks. In this week’s column, which I just finished writing, I mention two AppleScripts, and I thought it would be useful to talk a bit about AppleScript and discuss how you use AppleScripts with iTunes.
AppleScript is a scripting language that Apple developed for the Macintosh operating system in the early 1990s. It was first available on System 7.1.1, and it offers a way to take advantage of system functions via AppleScripts, short programs that are much easier to write than full-fledged applications.
AppleScript works with much more than just the operating system: many Apple programs (the Finder, iTunes, iPhoto, Safari, Mail, etc.) and third-party applications (Microsoft Office, Adobe Creative Suite, etc.) support AppleScript to some extent. But none more than iTunes.
AppleScript support can be limited–supporting a mere handful of commands–to complex. iTunes is one of those programs that offers in-depth scriptability, notably by providing access via AppleScript to the tags in your media files.
When you add AppleScripts to your ~/Library/iTunes/Scripts folder (that’s the Library folder in your home folder, the one with your house icon and your user name), they display in a Scripts menu in iTunes, and you can run them by choosing them. To access this folder, in the Finder, press the Option key, choose the Go menu, then choose Library. Next, find the iTunes folder there, and open it. If you have any AppleScripts, you’ll have a Scripts folder; if not, you’ll need to create one.
When you download any AppleScripts from Doug’s site, you place them in the above folder. Once they are in that folder, iTunes sees them. You’ll see a script icon in the menu bar, right before the Help menu.
For some scripts, you select one or more tracks; for others, you select a playlist. After you’ve selected the items the script is to run on, you click the scroll icon and select the script’s name.
That’s all there is to it. Make sure to check out Doug’s AppleScripts for iTunes to see what you can do with AppleScript, and don’t forget to donate to Doug Adams, who’s written hundreds of AppleScripts to help make iTunes better.