It’s ironic that, in years past, when Apple was planning its next generation operating system (Copland, Rhapsody, and the others that preceded Mac OS X), there was talk of scrapping AppleScript and implementing an entirely new scripting language.
Now Mac OS X v.10.1 is (almost) here and AppleScript is bigger and better in the new operating system. It offers more scriptable applications, toolbar scripts, QuickTime scripts and more. Plus, AppleScript Studio is due later this year.
Mac OS X 10.1 beefs up Finder scripting. Scriptable applications now include Print Center, Internet Connect, the Terminal, Image Capture, Mail, Sherlock, and TextEdit, as well as the Finder itself.
Toolbar Scripts can now be placed on the Finder Toolbar, offering drag-and-drop, click-and-run tools available in any open Finder window. You can place links to files, folders and applications in the Finder Toolbar. And for Mac OS X 10.1, Apple has built a set of AppleScript applets and droplets designed to take advantage of the Toolbar Scripts’ feature.
To use the Toolbar Scripts, place them in a folder of your choice. The most likely place would be to create a “Toolbar Scripts” folder in your Home Library. You can then open this folder and drag the icons of the scripts you want to use to the Finder Toolbar in the folder’s window.
Intrigued? Apple offers a variety of downloadable
Toolbar Scripts, with such names as Open Special Folder, Open Favorite Folders, Open Parent Folder, Add to Favorites and Open URL. There are also a variety of downloadable scripts for window management, using GraphicConverter, digital cameras and applying ColorSync profiles.
There’s an AppleScriptable Web Services enhancement in Mac OS X 10.1 that lets you use the scripting tool to query and command XML-aware applications on any platform, over the Internet or local networks. Web Services are XML-based, Internet-hosted applications that provide information and services to customers and users worldwide. What sort of services? Stock quotes, news reports, currency conversions, language translation, zipcode lookup, weather reports, spell-checking, maps and more, according to Apple.
Mac OS X 10.1 provides support for communicating with Web Services applications directly via AppleScript. The latest version of the operating system includes, by default, some script examples of how to use AppleScript with Web Services. You can download additional scripts from the
Script Menu page.
Speaking of Script Menu, it’s a utility that can launch Perl and Shell, as well as AppleScript, scripts. To launch it just
drag the ScriptMenu.menu file
to the menu bar at the top right of your screen and release. Do so and you’re ready to use any of the dozens of scripts pre-installed with Mac OS X 10.1. To remove the Script Menu, hold down the Command key and drag the Script menu icon off the menu bar.
Apple is working on AppleScript Studio, due before the end of the year. Studio combines AppleScript with Apple’s IDE (Integrated Development Environment) tools Project Builder and Interface Builder. “This makes AppleScript a peer language with Java and Objective C,” according to Sal Soghoian, Apple’s AppleScript guru.
AppleScript Studio is designed to let users make script applications that look, feel, and act just like Mac OS X applications. It will include such Aqua “widgets” as buttons, windows, sliders, checkboxes, tabs, radio buttons and more. Apple says AppleScript Studio will be “fun” to use, but will provide a set of professional application development tools featuring complete interface design and script writing with step-by-step debugging and source management.
This combination will give scripters a tool to create professional level scripts that can take advantage of everything AppleScript offers and provides end-users an Aqua interface to run the script, according to Soghoian. At the Seybold, he demonstrated a complex script, built with AppleScript Studio, where the script pulled data from FileMaker Pro and IMedia and placed the data into InDesign, creating a shake and bake real-estate catalog.
One of the goals of Mac OS X is to “marry two powerful technologies to let you do lots of cool things with QuickTime and AppleScript,” according to Apple. QuickTime 5.0.2 offers beefed up AppleScript support in the QuickTime Player application. The QuickTime Player scripting dictionary contains new commands and properties that can be used to automate many movie-editing and playback tasks performed by novices and professionals alike.
A collection of example scripts for Mac OS X v. 10.1 contains a variety of scripting tools, including script applets, droplets, and compiled scripts for use with the Script menu. In the
downloadable collection, all scripts are fully editable and many have properties whose values can be easily changed. However, the scripts only work with QuickTime 5.0.2. on Mac OS X 10.1 They’re not designed to work with earlier versions of QuickTime, including QuickTime 4.1, and they’re not compatible with Mac OS X 10.0 – 10.0.4.
With all these changes and enhancements, AppleScript is far from dead in Apple’s (long awaited) next generation operating system.