AppleScript Tricks

AppleScript is the famous Macintosh scripting language—a software robot that you can program to perform certain repetitive or tedious tasks for you.

iPhoto 5 is fully scriptable, meaning that AppleScript gurus can manipulate it by remote control with AppleScripts that they create.

But even if you’re not an AppleScript programmer yourself, this is still good news, because you’re perfectly welcome to exploit the ready-made, prewritten AppleScripts that other people come up with.

Preparing for AppleScript

Apple has paved the way for all kinds of AppleScript fun with its AppleScripts for iPhoto 5, which you can download from the “Missing CD” page of http://www.missingmanuals.com. You’ll probably find that after decompression, this download turns into a folder called Archive on your hard drive.

Now you need some way to run these scripts—to trigger them—and the best way is to install Mac OS X’s ingenious Script menu. Here’s how you go about it:

  1. Rename the Archive folder iPhoto Scripts, or something equally helpful.

    This is the folder you downloaded.

  2. Open your Applications → AppleScript folder.

    You’ve just unearthed a few tools that Apple provides for AppleScript fun.

  3. Double-click the icon called Install Script Menu.

    A new icon, shaped like a scroll, appears at the upper-right end of your menu bar (Figure 13-5). This, ladies and gentlemen, is the Script menu.

    Tip

    You can remove the Script menu icon by ⌘-dragging it away from the menu bar.

    Figure 13-5. Apple’s iPhoto scripts, ...

Get iPhoto 5: The Missing Manual, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.