< Day Day Up > |
AppleScript is a simple programming language that lets Mac fans write mini programs to perform certain tasks . For instance, you could rig AppleScript to make iTunes play "We Will Rock You" at 8:03 every morning. Or you could use an AppleScript to send an email every three hours to your co-workers telling them how many shopping days are left until Christmas. There are plenty of frivolous uses for AppleScript, too. 13.1.1 Installing the Script MenuMac OS X comes with a handful of ready-made AppleScript programs (called scripts ), including one that checks the current temperature in your Zip code and one that lets you count messages in all your mailboxes. Most Mac fans never even know they exist, because these scripts are buried in the Application AppleScript ExampleScripts folder. Fortunately, theyre also listed in something called the Script menu, an icon on your menu bar that puts the scripts at your fingertips. To install the Script menu, open your Applications AppleScript folder, and double-click the folder icon called Script Menu (see Figure 13-1). Figure 13-1. The Script menu, which looks like a little scroll at the right end of the Mac's menu bar, lists dozens of useful AppleScript mini programs. Why perform five or six steps when all you have to do is find and run a script designed to automate the task?13.1.2 Apple's iPod ScriptsIf you want to maximize the potential of the Notes feature (Section 9.2), Apple has a collection of scripts just for you. You can download the collection at http://www.apple.com/applescript/ipod. (These scripts work with Mac OS X 10.2 and later.) Install them by dragging the downloaded folder (called iPod) into your Home )Library Scripts folder. Magically, they now appear in your Script menu, as shown in Figure 13-1. Here are the names of the iPod scripts in the collection and the actions they perform:
13.1.3 Doug's AppleScriptsDoug's AppleScripts for iTunes has a Wal-Mart sized inventory of AppleScripts for Mac music adventures including a section devoted to iPod- related scripts. New scripts appear here frequently, so it's a good site to look in on every so often. Many of the scripts automate the transfer or deleting of songs between iPod and Mac. For example, the collection called Four iPod Scripts (which actually contains five scripts and seems to be designed for people who have far too much music to fit on their iPods) contains AppleScripts like these:
A script called Rip to iPod v1.0, for Mac OS 9 and X, tells iTunes to rip the checkmarked songs from a CD, copy them to the iPod, and then delete the tracks from the iTunes library. You skip the part about saving the audio files on your hard drive first, which can save some disk space. (Just make sure that your iPod isn't set to autosync.) You'll find a link to the iPod scripts at http://www.missingmanuals.com. They're worth a look by anybody who loves making the Mac do stuff on its own. (The same author has created a library of iTunes-related AppleScripts; see http://www.malcolmadams.com/itunes.) |
< Day Day Up > |