Running AppleScripts in iTunes

 

When iTunes 2 introduced a Scripts Menu in the Menu Bar with the ability to launch AppleScripts, you wouldn't have known it at first glance. That's because you had to set it up. You may still have to. Here's how:

OS X: For single Users, make a "Scripts" folder in the [username]/Library/iTunes/ folder. Put your scripts in the "Scripts" folder and they will appear in iTunes' Scripts Menu.

To make AppleScripts available to all Users, create a folder called "Scripts" and place it in the Library/iTunes/ folder of your startup drive (you may have to create the "iTunes" folder; I think you can put the "iTunes Plug-Ins" folder here also).

You can organize your scripts to some degree by placing them in folders inside your Scripts folder. This will help you in the Finder; the Scripts will still appear in one long list in iTunes' Scripts Menu. (Some other attachable applications let you use sub-folders which create a sub-menu heirarchy—hint hint, Apple!) I am not aware of any maximum limit on the number of scripts you can put in your Scripts folders. As of this writing, I have 288 that I use regularly or that I am working on.

Users of Mac OS 10.3 and higher can assign keyboard shortcuts to AppleScripts in the iTunes Scripts Menu.

Another way of accessing scripts is with some sort of launcher. OS X has the Script Menu which let's you run scripts system-wide from a drop down menu in the Menu Bar. You add scripts to the Scripts Menu by putting them in the Library/Scripts/ folder for all users or the [username]/Library/Scripts/ folder for individual users.

You can load AppleScript applets (applications) into the Finder's toolbar by drag and drop, or you can keep them in the Dock.

AppleScripting components are automatically installed by OS X, so unless you've gone and done something crazy, AppleScripting under OS X should be all set. Script Editor is in the Applications/AppleScript/ folder. Also contained in this folder is the AppleScript Utility, which enables the system-wide Script Menu, GUI Scripting, default Script editor, and other options.

updated apr 27 '08

This column is printer-friendly.
Site contents © 2001 - 2009 Doug Adams and weblished by Doug Adams, dougscripts AT mac DOT com.
All rights reserved. Legal.
AppleScript, iTunes, and iPod are registered trademarks of Apple Inc.
Image 01 Image 01 Image 01 Image 01 Image 01 Image 01 Image 01 Image 01 Image 02 Image 03 Image 03 Image 03 Image 03