Folders in Action
Folder Actions take AppleScript a step further by running automatically when a folder is open or changed in some way. Mac OS X comes with a small selection of useful scripts inside a folder called Folder Action Scripts within the Scripts folder in the main Library folder. To attach one to a folder, Control-click on the folder and select the Attach a Folder Action contextual menu item. In the window that appears, you’ll see the scripts inside the Folder Action Scripts folder. Choose one, such as the Duplicate as TIFF script, and then press the Choose button. Your folder has now been primed with a Folder Action! In this instance, the script will only fire if an image file is placed in the folder, so drop a JPEG or GIF into the folder. After a moment there will be an audible signal of some sort, and then when you look inside the folder you’ll be greeted with two new subfolders: one containing the original image, and another the TIFF file made from it.
Crafting your own Folder Actions is, frankly, hard work. If you want to learn more about Folder Actions, the best place to start is Apple’s own web site. Otherwise, Automator, which we’ll look at next, is a lot more fun.
Figure 5 Attach folder actions by Control-clicking an item and selecting the relevant option.