AppleScript is a scripting language developed by Apple primarily for scripting applications that have a graphical user interface (GUI). It reads like English and is targeted more at the general Mac user than the programming professional. Nonetheless, even the serious programmer has something to gain from AppleScript; without AppleScript, it is virtually impossible to take full advantage of the functionality offered by applications ranging from iPhoto to QuickTime, Mail to Microsoft Word. AppleScript is to GUI applications what the Bash Shell is to Unix commands—the glue that binds them together. (If you don't know what this means, read Chapter 11 on the Bash Shell.)
In recent years, AppleScript has ventured beyond its traditional hunting grounds into application development. By integrating AppleScript with the Cocoa frameworks (see Chapter 8), Apple has made it possible to develop fully fledged Mac OS X applications with AppleScript, using a suite of tools called AppleScript Studio. This makes it possible for non-programmers to easily write applications that look stunning and behave like any other Cocoa application.
This chapter provides an introduction to AppleScript and a brief look at AppleScript Studio. Here are some of the things you learn:
The different ways you can use AppleScript scripts, and the tools you can use to create them
The basics of the AppleScript language
How to script applications like Finder, iPhoto, and QuickTime ...