AppleScript 1.8.1 (Mac OS X 10.1.2 Puma) {no OS 9 ver.}

Mac OS X 10.1.2 was released via the Software Update preference pane in mid-December 2001, and standalone updaters were released a few days later in the form of a combo updater from Mac OS X 10.1 or 10.1.1 and a regular updater from Mac OS X 10.1.1. It includes AppleScript 1.8.1 for the native Mac OS X environment, and Standard Additions 1.8.1. Script Editor remains at version 1.7. The Mac OS X 10.1.2 updater does not update AppleScript for the Classic environment, which remains at version 1.7 if you applied the Mac OS 9.2.2 update released just a couple of weeks earlier. Mac OS 9 does not have a corresponding upgrade to AppleScript 1.8.1, either.

This is a dot-dot release and therefore contains relatively few new features or feature changes. As a result, this report is relatively short.

Like the reports on previous versions of AppleScript, this report is based on information obtained from various sources, including official Apple publications and several AppleScript and Mac OS X mailing lists and news groups, and my own investigations. It includes information I have dug out of the product itself, as installed on my own computers.

AppleScript Studio
The star attraction of Mac OS X 10.1.2 is AppleScript Studio, which requires AppleScript 1.8 or newer. The initial public release of AppleScript Studio came shortly before the release of Mac OS X 10.1.2, to Apple Developer Connection members (including free members), along with AppleScript 1.8, on the December 2001 Developer Tools quarterly CD. AppleScript Studio applications require at least Mac OS X 10.1.1 and the December 2001 Developer Tools, or Mac OS X 10.1.2, in order to run. Development of AppleScript Studio applications requires either version of Mac OS X and the Developer Tools.

AppleScript Studio is an enhancement to Apple’s existing developer tools, Project Builder and Interface Builder, incorporating AppleScript as a supported language for development along with C, Objective-C, C++, and Java. In addition to a new applescript.component file, it adds a new AppleScriptKit.framework to the system frameworks, source for a number of example applications, and a new volume of Inside Mac OS X devoted to AppleScript Studio. Using these tools, knowledgeable developers can build full-fledged Cocoa applications that run natively on Mac OS X using AppleScript. Among the many attractions of AppleScript Studio are the ability to include a complete Aqua-compliant application user interface using the visual design tools of Interface Builder, professional-level debugging using the debugger that comes with Project builder, and Project Builder’s powerful editing capabilities, including text files that are not constrained by Script Editor’s 32K limit, find and replace, and drag and drop editing. Using AppleScript entails trade-offs, of course, and Apple warns that AppleScript Studio may not be an appropriate development environment for applications that do, for example, intensive data processing or that manage large amounts of data.

AppleScript Studio is not for beginning scripters, and even experienced scripters will find that a fairly deep understanding of the Cocoa frameworks is required to get past the simplest tasks. The documentation, though excellent, falls short in explaining Cocoa technology, so newcomers to Cocoa will quickly find that they have to begin wading through the voluminous techical documentation for Cocoa developers. It is a developer’s tool, aimed not only at advanced AppleScripters who need to incorporate a full user interface into their AppleScript solutions, but also at Cocoa developers who can meld AppleScript into applications that are otherwise based primarily on Objective-C. It also adds comprehensive AppleScript support for scripting the user interface of Cocoa applications in which AppleScript support is turned on.

Apple’s Script Editor and the third-party scripting solutions such as Scripter, Script Debugger, Smile, and FaceSpan, will continue to play an important role in the AppleScript community. For one thing, AppleScript Studio requires Mac OS X; it cannot be used in the classic Mac OS, where Script Editor or one of the third-party products is therefore still required to work with AppleScript. More importantly, AppleScript Studio does not produce compiled scripts, but applications. There remain a great many situations wherein a compiled script, whether simple or complex, or even an AppleScript application that does not require a comprehensive user interface, can be more easily developed using Script Editor or a third-party tool. Script Editor, Script Debugger, and Smile are already available in Mac OS X-native versions. Finally, FaceSpan, if it is ported to Mac OS X as rumored, will likely offer some advantages over AppleScript Studio, including what I feel is, in its classic Mac OS incarnation, a more thoroughly object-oriented graphical user interface builder. FaceSpan is a third-party AppleScript application development environment that was originally distributed by Apple as Frontmost in 1993 with early releases of AppleScript.

Third-party Web sites relating to AppleScript Studio are already starting to crop up. One is Cole McDonald’s AppleScript Studio Tutorial, each page showing how to perform a specific task. 10/18/02

I cover AppleScript Studio in greater depth in another forum, MacTech Magazine, which published the following articles I wrote about AppleScript Studio: AppleScript Studio: An Introduction, MacTech Magazine, Vol. 18, No. 1 (January 2002); AppleScript Studio: Implementing an Application Preferences System, MacTech Magazine, Vol. 18, No. 5 (May 2002); and AppleScript Studio: Implementing a Document-Based Application, MacTech Magazine, Vol. 18, No. 7 (July 2002). The project source files for the Doyle application described in the last two articles can be downloaded here. 10/8/02