Thursday 28th March, 2002
The arrival of AppleScript Studio was a worthwhile event for people using AppleScript. Although billed as a new, separate product, AppleScript Studio is really an additional dialect and target for the development environment that comes with Mac OS X. This is a welcome addition, though, as the development environment comes free with a boxed version of OS X, and ships as an optional install on all new Macs.
The development environment allows you to create a whole range of project types (around 30 in all), from screensaver plug-ins to fully fledged Java, Carbon and Cocoa applications. AppleScript Studio adds AppleScript applications and droplets to the list.
Studio provides the scripter with almost full access to the same development tools someone working in Objective C and C++ would find - in other words, the Project Builder, Interface Builder, and Cocoa application framework. For once the claims of ‘rapid application development’ ring true.
Interface Builder is a smart application that makes developing a project quicker and easier. You use drag and drop to create windows, dialog boxes and menus for your application. It has autoalignment tools and smart rulers; when you drag a button or menu control on to a window, it automatically shows you the various centre lines of other objects on the window.
It also shows the standard margins and spacing that the Apple Human Interface Guidelines expect you to use in your Mac operating sytsem applications. Once you’ve created your interface elements, you use inspector-type dialog boxes to name each element, and attach scripts to the various methods belonging to your interface elements.
Project Builder, the hub of Apple’s integrated development environment, is where you can edit and debug your scripts, as well as manage the files needed to create an application. The project templates are already created for basic application functionality, so it’s a fairly quick job to compile an interface for an AppleScript you’ve written. You have full access to all the standard OS X and Aqua user interface objects, such as buttons, menus, tables, sliders and panels.
You can easily create simple programs to act as front ends to AppleScripts for controlling other applications - for example, an interface for managing the options in a script between QuarkXPress and FileMaker.
While Studio isn’t a brand-new product, the addition of AppleScript as a programming dialect to Apple’s already excellent development environment is a welcome one. Its rapid prototyping environment, for prototyping a new interface and application idea, is superb and surpasses its rival Facespan.
Apple is keen to encourage more application development on the Mac. Studio is a stepping stone for bringing new programmers into full-blown application development. You can imagine a beginner who found it easy to create an application in AppleScript, might move on to porting a Unix or Java tool, and then to creating their own Cocoa-native application. After all, the development environment is the same, and you can use the same resources (interface files) for both projects.
Unlike other programming applications, AppleScript Studio is extremely accessible to new programmers. For once, there’s excellent documentation in both HTML and PDF format, as well as a complete set of 18 interface element scripting examples. There are coding examples for everything from checkbox buttons, file browsers, drawers, panes, progress indicators and table cells, to SOAP calls to Web-based applications.
Tales from the script
It’s not quite free of bugs, but there are plenty of people using it so the bug reports, bug fixes and workarounds are flowing thick and fast. Try MacScripter’s mailing list at www.macscripter.net, for example.
AppleScript Studio requires OS X 10.1.2 and AppleScript 1.8.1. It’s incompatible with Late Night Software’s excellent Script Debugger, but hopefully this will be fixed soon. Studio’s debugging tools are as good, and you wonder if this will end up killing off Debugger as an application.
If you want a copy and you don’t have a new machine with an optional installer on your hard disk, fear not. AppleScript Studio is free to download from the Apple Developer Web site, but you need to register for the free membership. However, if you balk at a 218Mb download, you can buy it as a $20 CD ROM.
Apple is keen to encourage more application development on the Mac. Studio is a stepping stone for bringing new programmers into full-blown application development
|Get Further Info|
|Pros||Free on all new Macs + Easy to use + Mac OS X Aqua interface|
|Cons||Still a few bugs + AppleScript 1.8.1 incompatible with Script Debugger|
|Originally Published||MacUser, Volume: 18, Issue: 06, p34|