Fourteen chapters into this book, you're probably pretty sick of dinky scripts that simply command programs and display dialog boxes. What would really be cool is if you could create full-fledged programs of your own, complete with text fields, buttons, windows, and other staples of the Mac interface.
"But of course," you say, "that's what advanced programming languages like Objective-C, C++, and Java are for!" You're right, but those aren't the only options. Thanks to AppleScript Studio, a beginner-friendly programming tool, you can write your own graphical Mac OS X programs with nothing but AppleScript as the underlying code.
The example scripts from this chapter can be found on the AppleScript Examples CD (see Sidebar 2.1 for instructions).
Contrary to popular opinion, AppleScript Studio is not a chic art gallery tucked away in Building 5 of Apple's campus in Cupertino. Instead, it's the name Apple gave to the integration of two programs—Xcode and Interface Builder—with AppleScript. When you use AppleScript Studio, you design your program's look and feel in Interface Builder and write the AppleScript code that makes the program tick in Xcode. By the time you're done, you've got a slick-looking Mac OS X program, coded entirely with AppleScript.
Now, this arrangement might seem pretty ridiculous to a seasoned programmer—after all, AppleScript is one of the slowest programming languages around. Still, if you're coming from ...