APPLESCRIPT TOOLS, SCRIPTING ADDITIONS, AND SCRIPTABLE APPLICATIONS
I count more than 25 items in Mac OS X 10.1 that are scriptable, if you install the Developer Tools as well as the basic system. But a small number of these items are apparently only accidentally scriptable, and some are merely delegates or helpers for other items, so the overall picture of AppleScript support in Mac OS X 10.1 is still not fully developed. We are grateful for the progress and look forward to more.
Installed Software and Dictionary Changes
Apple Help Indexing Tool 1.3.1 This is the first Mac OS X native version of Apple’s utility for creating the index used by an Apple Help module. It is installed from the Developer Tools CD and is of interest only to authors of Apple Help modules. It is installed in the /Developer/Documentation/Apple Help/ folder, and an alias to it also appears in /Developer/Applications/. You will also find documentation, templates and a tutorial about writing Apple Help modules. An Apple Help Reference document is offered both in PDF and HTML form; the latter can be dragged to /Developer/Documentation/Help/ to make it appear in Apple Help Viewer’s Developer Help Center, if you installed Developer Tools. There is a little information in this reference about using AppleScripts in Apple Help modules.
It is encouraging to see AppleScript support in this utility, because some aspects of creating Apple Help modules are tedious, and bringing AppleScript into the picture bodes well for automating some of the process.
The dictionary includes several generic AppleScript commands that are provided automatically by a well-known third-party development system if you don’t remember to turn off the feature, but in this case (unlike some others) the AppleScript support apparently is not accidental. It includes a Help Indexing Tool Suite with a few commands that are unique to this application. The syntax does not conform to AppleScript standards, however. For example, there are Turn Remote Root and Turn Anchor Indexing commands, which are incomplete grammatical constructs that you complete by supplying the string on or off as the direct parameter. Among other problems, this violates the rule that an AppleScript command should be a verb that is complete in itself. More to the point, AppleScript standards would lead one to expect these to appear instead either as Boolean properties of, say, the Application or Document class, or Boolean parameters of a command. With a properly designed deictionary, you might write a statement like this: ‘tell application Apple Help Indexing Tool to set anchor indexing of front document to true’, or ‘tell application Apple Help Indexing Tool to index document 1 with anchor indexing’. Instead, this dictionary requires you to write ‘tell application Apple Help Indexing Tool to turn anchor indexing on’. Inconsistently, the Application class in the Help Indexing Tool Suite does include one Boolean property, idleStatus, which is read-only and unexplained.
Apple System Profiler 2.7f1
The guts of the scripting dictionary of Apple System Profiler remains the very extensive lists of properties that are available as part of the Application and Report classes. Using these, you can find out just about anything you want to know about your computer using AppleScript.
There are no changes to the dictionary from version 2.6b21 in Mac OS X 10.0.
Classic Support 2.0
I only recently noticed that the Classic Support application, installed in the classic Mac OS System Folder to support the Classic environment of Mac OS X, purports to be scriptable. Although it doesn’t appear in the list of classic and Mac OS X scriptable items in Mac OS X’s Script Editor when you use the Open Dictionary command, it does have a dictionary. You can open its dictionary by dragging its icon onto the Script Editor icon. The dictionary suggests that it is actually the dictionary of the classic Application Switcher application, and I can’t get it to work. Perhaps this has to do with enabling Mac OS X scripts to control the Classic environment.
ColorSyncScripting 4.0
The ColorSyncScripting application is, loosely speaking, a scripting addition in the /System/Library/ScriptingAdditions/ folder. There are no changes to its dictionary compared to verson 3.1 in Mac OS 10.0.
FontSyncScripting 2.0
The FontSyncScripting application is a scripting addition in the /System/Library/ScriptingAdditions/ folder. It is new in Mac OS X 10.1. It is distinguished from the other scripting additions installed with Mac OS X 10.1 by a different icon consisting of a document with a script or scroll superimposed, rather than the new cube icon style. The significance of this eludes me.
Help Viewer 1.7.2
Help Viewer is found in /System/Library/CoreServices/. It continues to have a small dictionary designed to be of use to authors of Apple Help modules. There are no terminology changes from Help Viewer 1.7 in Mac OS X 10.0.
Image Capture Scripting 1.5
The Image Capture Scripting application is a new scripting addition in Mac OS X 10.1. It is designed to assist with automation of the Mac OS X feature that lets you download digital images from many digital cameras directly into your computer. With Image Capture Scripting you can automate scaling and rotating of images and determine the height and width of an image.
iMovie 2.1.1
iMovie has but a single command in its dictionary, DoCommand, and the dictionary explains nothing about it. I therefore hesitate to call it scriptable.
Interface Builder 2.1
Interface Builder is installed in /Developer/Applications/ when you install the Developer Tools CD. It is the graphical user interface builder portion of Apple’s Mac OS X Integrated Development System (IDE) inherited from Next. (Developers know that it is in fact much more than a visual interface design tool, in that the so-called nib files that it produces contain, at least in the Cocoa environment, a serialised archive of objects that are unarchived and restored to their original states when an application is launched. Unlike many other GUI design tools, Interface Builder is not a code generator, and it provides much more flexibility in controlling the appearance of an application. (You may think you didn’t need to know that, but once AppleScript Studio is released you will begin to understand the implications.)
The dictionary has changed somewhat since Interface Builder 2.0 in Mac OS X 10.0, but for the most part only because of the changes made in the Cocoa frameworks on which InterfaceBuilder is based. See the discussion of Mail, below, for details. Also, the Cell and Control classes have lost their Supertype and Type properties, but they remain available through the Object superclass from which they inherit. The application class has lost its Frontmost, Name and Version properties.
The fact that Interface Builder is scriptable has generated some excitement among Mac OS X developers. However, Apple engineers have mentioned on the developer mailing lists that it is not yet the complete scripting implementation that is expected.
Interface Builder has been at the heart of even more excitement among AppleScript developers since Apple announced that AppleScript Studio will become available later this year. The screenshots on Apple’s teaser web site for AppleScript Studio bear a striking resemblance to Interface Builder user interface widget palettes, and reports of Sal Soghoian’s demonstration at Seybold in September 2001 indicate that AppleScript Studio makes use of Project Builder technology, as well. The prevailing expectation among observers is that AppleScript Studio will enable scripters to develop complex, sophisticated AppleScript-based applications with all manner of standard Macintosh user controls such as buttons, sliders, pop-up menus and the like. Advanced Project Builder-style debugging capability is also expected.
Internet Connect 1.1
The Internet Connect application is newly scriptable in Mac OS X 10.1. Using AppleScript, you can connect to the Internet using a specified configuration (AirPort, PPP or PPPoE), optionally supplying a telephone number for a modem. The AirPort configuration class allows you to determine whether the AirPort card is powered on, the base station’s ID, and the signal strength, for example. The PPP configuration class includes the telephone number. A Status Record class exists for every configuration, from which you can obtain the connection’s speed, the number of seconds connected and remaining, the number of bytes sent and received, the protocol, and other items of information. (Note that you cannot obtain the Status object itself using AppleScript, but only its individual properties.)
Internet Connect’s dictionary bears some similarities to the classic Mac OS AirPort Scripting scripting addition that was released only recently with the AirPort 1.3.1 package, but which is not available in Mac OS X. For example, you can use the new Connect command to connect to the Internet using AppleScript with a telephone number, user name, and password, just as you can in the classic Mac OS using Airport Scripting’s Dial command. However, in Mac OS X you can also use the Disconnect command to hang up the base station modem, but there was no way to hang up in the classic Mac OS using Airport Scripting. (Note that you cannot tell an AirPort base station’s modem to disconnect if you are wired to the base station using Internet instead of AirPort’s wireless network.) In Internet Connect you can turn your computer’s AirPort card on and off using the AirPort Power property of the AirPort Configuration class, just as you could using the Power property of the Card class in AirPort Scripting. You can also monitor many aspects of a PPP or PPPoE connection, such as protocol, speed, bytes sent and the like. AirPort Scripting did some of these things in a more useful manner (it defined many protocol types as enumeration constants, for example, whereas Internet Connect uses integers). Internet Connect is mostly an Internet utility, so it lacks AirPort Scripting’s Join and Scan commands, with which you could obtain a list of available AirPort networks and sign on to one of them, and its Create command with which you could create a new network; but you can obtain an AirPort network’s name, type and signal level as properties of its AirPort Configuration class.
I find that scripting Internet Connect is difficult. In particular, the properties of a status record seem to be inaccessible. One user has reported that the Apple event code for a status record is misspelled.
Apple’s Chris Nebel has reported that the Connect command returns immediately, so you have to use an Idle handler or a repeat loop to detect whether the connection has been made. A better implementation is promised for the future. 12/28/01
Internet Explorer 5.1.2 (3707)
The Microsoft Internet Explorer application comes with Mac OS X 10.1, and it remains scriptable. There are no terminology changes from Internet Explorer 5.1b1 (5502) installed by Mac OS X 10.0.
Mail 1.1
Mail, a Cocoa application, is scriptable with a fairly extensive terminology dictionary.
There are a number of changes to the dictionary since Mail 1.0 in Mac OS X 10.0. Most of these reflect changes made to the Cocoa frameworks, on which Mail is based, so these changes also appear in other Cocoa-based applications, such as TextEdit. Most of them correct the very awkward terminology for the Window class implemented in earlier versions of the Cocoa frameworks; the Window class terminology has since been changed to conform to longstanding AppleScript standards.
The Count command now takes an optional Each parameter, as specified by the Standard Suite.
In the Window class, several properties have been changed to use correct AppleScript terminology: Is Running Modal is now Modal, Has Close Box is now Closeable, Is Resizable is now Resizable, Is Miniaturizable, is now Miniaturizable, Is Miniaturized is now Miniaturized, Is Floating is now Floating, Is Zoomed is now Zoomed, Is Visible is now Visible, Has Title Bar is now Titled, and Is Zoomable is now Zoomable.
The Class property, returning an integer, has been removed from the Window, Application, Color and Document classes. However, it is still accessible through the Abstract Object super class from which they inherit and which is still present in the dictionary. A similar change appears in the other Cocoa applications, and this point will not be repeated in the discussion of them in this report.
PEFViewer 1.0
PEFViewer is installed in /Developer/Applications/ when you install the Developer Tools. It is a technical developer utility which happens to contain the standard dictionary that is automatically implemented in applications built using a certain standard third-party development system. It is unchanged from PEFViewer 1.0 in Mac OS X 10.0.
Print Center 1.0
The Print Center application is still at version 1.0, as it was in Mac OS X 10.0, yet its dictionary has changed. It now includes a new Print Center (notice the space) Suite, in addition to the somewhat mysterious PrintCenter Suite (no space) that was there in Mac OS X 10.0. The new Print Center Suite includes the Run, Quit and Count commands, and Application, Printer and Job classes. With the Current Printer property of the Application class, you can get and set the current printer, and with the Printer class, you can get the Name of the current printer, its Status (Printing, Idle, Stopped or Error), and its Kind (the manufacturer’s description). With the Job class, you can get the Name of a print job, its Status (Printing, Waiting, Hold Until, Hold and Error), as well as its Priority (Low, Normal or Urgent).
Print Center, with its new dictionary, gives Mac users a wide-ranging ability to monitor and control the printing process through AppleScript. Print Center lets you identify all printers known to Print Center, to determine the current status of each printer and each print job.
Note that the various properties of the current printer must be accessed by first getting the Current Printer, then getting, for example, the Name or Status of the result.
The use and purpose of the PrintCenter Suite are not clear. If, as appears to be the case, they cannot be used in AppleScript scripts, they should not be disclosed in the dictionary.
Project Builder 1.1
The Project Builder application is installed in /Developer/Applications/ when you install the Developer Tools. It is the other half of Apple’s Integrated Development Environment (IDE). It is newly scriptable in Mac OS X 10.1, although there is nothing in its scriptability that relates directly to Project Builder’s mission; its dictionary consists only of the Standard Suite and the Text Suite as implemented in the Cocoa frameworks. See the discussion of Interface Builder for details.
QuickTime Player 5.0.2
Apple has been very aggressively touting the scriptability of QuickTime Player. A major update to the bevy of QuickTime scripts was available on Apple’s web site the day Mac OS X 10.1 was announced.
Changes to the terminology of QuickTime Player since QuickTime Player 5.0, which shipped with Mac OS X 10.0, are nevertheless minor. The Display class has lost its Name property. The Movie class has gained Current Chapter Track, Current Chapter, Streaming Status Code and Streaming Status Message properties.
Days before the release of Mac OS X 10.1, Apple published a What’s New in QuickTime 5 PDF document detailing the features of QuickTime 5.0.2. Included is a nine-page chapter on AppleScript Changes and Additions in QuickTime 5 and a detailed discussion and explanation of an example script for adding custom skins to the QuickTime Player.
Script Runner 1.0
Script Runner, the floating button implementing a customizable menu of scripts, is not scriptable in the traditional sense, but it runs scripts. It still sports the same 1.0 version number that it did in Mac OS X 10.0. One very important change has occurred, however: it now remembers where you left it when you reboot your computer. Gone is the annoying problem which, in Mac OS X 10.0, required you to move it away from the upper left corner of your screen, where it always blocked your view of any application’s frontmost window. I have Script Runner set as an automatic startup or login item in the Login panel of System Preferences, and I keep the button in the lower right corner of the screen where I can pop the menu up instead of down. Script Runner is located in the AppleScript subfolder in the Applications folder.
Script runner is unusual in several respects, one being that, although it has a visible user interface, it does not appear in the Dock and it does not have any accessible commands in the menu bar. As a result, you can’t easily make it quit once you launch it. Or can you? If you use Script Runner, save this script as a compiled script and place it at the root level of /Library/Scripts/; it will add a Quit Script Runner command to your Script Runner button’s pop-up menu: ‘tell application Script Runner to quit’.
Sherlock 3.2
Sherlock has been scriptable for a long time, allowing you to search your computer or the Internet under AppleScript control. There are no changes in its terminology since Sherlock 3.1 in Mac OS X 10.0.
Sketch 1.2.0
Sketch is a scriptable drawing application used as an example for developers of how to write Cocoa applications. It is installed in /Developer/Applications/Extras/ when you install the Developer Tools CD. Its dictionary remains unchanged from the same Sketch 1.2.0 that was installed from the Developer Tools CD with Mac OS X 10.0, except that it was recompiled with the newest version of the Cocoa frameworks and therefore gains the terminology improvements in the Window class that are part of Cocoa’s improvements; see the discussion of Mail for details.
SpeakableItems 3.0.1
The SpeakableItems application is found in:
/System/Library/Speech/Recognizers/AppleSpeakableItems.SpeechRecognizer/Contents/Resources/
To write scripts using its supplied commands, use the form ‘tell application SpeakableItems to’. The SpeakableItems dictionary is actually entitled the Speakable Items Server Dictionary. In a bit of Mac OS X magic, once you turn on speakable items in System Preferences, a new Speech folder will be created automatically in your ~/Library/ folder. In it, you will find a Speakable Items folder containing all of the familiar speakable items, such as Tell me a joke, and an Application Speakable Items folder containing speakable items for three applications. Only one of the speakable items, Open Sherlock, is configured as a traditional AppleScript, but you can write more of your own.
SpeechRecognitionServer 3.0.1
The Mac OS X v10.1 Technical Note refers to improvements in Speech Listener. The classic Mac OS has a scripting addition with the name Speech Listener, a relatively recent addition to Apple’s standard set of scripting additions, which allows you to write custom interactive speech-based scripts. Speech Listener appeared at first glance to be missing in action in Mac OS X 10.1. Thanks to Kim Silverman, Apple’s Principal Research Scientist and Manager, Spoken Language Technologies, I have learned that it has simply been incorporated into the speech recognition engine in Carbon frameworks, where it uses less memory and is much more robust, accurate and responsive. To open its dictionary, navigate to this rather daunting address:
/System/Library/Frameworks/Carbon.framework/Versions/
A/Frameworks/SpeechRecognition.framework/Versions/A/Resources/SpeechRecognitionServer
If you plan to do any speech recognition scripting, I recommend that you save an alias to it in a more convenient location. Scripting it is easy; just ‘tell application SpeechRecognitionServer to’, although its dictionary is entitled Speech Recognition Server Dictionary (with spaces).
Standard Additions 1.7 (Mac OS X)
Standard Additions for Mac OS X has undergone only minor amendment since Mac OS X 10.0. It continues to provide an essential set of terminology add-ons to the core AppleScript language. It is located in /System/Library/ScriptingAdditions/.
Terminology changes since Standard Additions 1.6 in Mac OS X 10.0 are confined to the addition of these properties to the File Information class returned by the Info For command: Displayed Name, Name Extension, Extension Hidden, and Package Folder. The first three of these correspond to the same new properties implemented in the Finder 10.1 Item class and are intended to assist scripters in dealing with the new Mac OS X 10.1 file name extension regime.
In addition, a number of existing commands are now fully implemented or enhanced, as described in the New Features and Changes sections, above.
Standard Additions continues to offer the Folder Actions commands, but Folder Actions capability is still missing from Finder 10.1.
Standard Additions 1.7 (Mac OS 9.2.2)
The Standard Additions scripting addition for the classic Mac OS and the Classic environment of Mac OS X contains several terminology changes from version 1.6, one of which is important for scripts that attempt to ensure backwards compatibility by detecting the version of system software that is currently running. 12/28/01
The important fix in the classic edition of Standard Additions 1.7 is that it now includes, in the Miscellaneous Commands suite, the same new System Attribute command that first appeared in the Mac OS X-native edition of Standard Additions 1.6. We described at length in The AppleScript Sourcebook’s Report on AppleScript 1.6 how the absence of the System Attribute command in the classic edition of Standard Additions 1.6, coupled with the fact that the classic Finder’s old Computer command was not accessible when running a script in the Classic environment of Mac OS X, caused old scripts that rely on the Computer command to fail. Now, with AppleScript 1.7 installed in the Classic environment, those old scripts will run correctly.
The following additional terminology changes appear in the classic edition of Standard Additions 1.7 (Standard Additions bug fixes are described under Bug Fixes, below):
The Choose Application command no longer contains an optional As parameter. It isn’t needed, anyway, since normal coercions can be applied to the returned result. Note, however, that the optional As parameter remains in several other commands, such as the Path To command and the File Read/Write commands.
The result of the Choose File Name command is now File, not File Specification.
A number of parameters to various commands take Plain Text, not String, data.
Other parameters to other commands, and values returned by some commands, such as the Name property of class File Information returned by the Info For command, take Unicode text, not international text, data. This is important for obtaining the full file name of file names that are longer than 32 characters. These commands and values no longer support the encoded file names generated by older software when encountering file names longer than 32 characters.
Descriptions of some command results have changed. For example, the Choose From List command is said to return a list of plain text, not just a list; the List Disks command returns a list of alias instead of a list of list; and the List Folder command returns a list of Unicode text rather than a list of list.
In class File Information, returned by the Info For command, the same new Package Folder Boolean property is added as appears in the Mac OS X-native edition of Standard Additions 1.7.
The Store Script command’s dictionary entry now correctly lists the In parameter as optional, where formerly it was incorrectly listed as a required parameter. Omitting the In parameter causes the user to be prompted for a file name.
Users have reported a variety of major bugs in some of the Standard Additions 1.7 commands in Mac OS 9.2.2, as in the Finder. These problems are detailed under New Bugs, below.
StuffIt Expander 6.0.1
Aladdin Systems’ StuffIt Expander application, unchanged since Mac OS X 10.0, has the single AppleScript command that it needs, Expand. StuffIt Expander 6.5 is now available for free from Aladdin.
System Events
System Events is a new application to service certain AppleScript commands formerly handled by the Finder relating to processes. It is located in /System/Library/CoreServices/. This is the mysterious application to which the Finder delegates the handling of certain AppleScript commands formerly handled by the Finder. Although it has a dictionary and can be told to execute commands, you can do the same thing by using the traditional Finder commands; System Events will be invoked behind the scenes to carry them out. See the discussion of Finder 10.1 for details.
This statement, ‘tell application System Events to get name of front process’, returns loginwindow. But a script will be more compatible with the classic Mac OS if it gets the same result with this statement: ‘tell application Finder to get name of front process’.
Terminal 1.1
Terminal, providing the UNIX command line interface (CLI) for Mac OS X, is newly scriptable in Mac OS X 10.1, finally fulfilling the longstanding promise to make AppleScript a two-way street in Terminal. You have been able to execute AppleScript scripts from within Terminal, and now you can use AppleScript to tell Terminal to execute shell scripts by using the new Do Script command. The power this potentially makes available to AppleScripters to control the innards of Mac OS X is amazing, and more than a little scary but you have to learn UNIX shell commands, first. (Hmm. Can we write an AppleScript to tell Terminal to execute an AppleScript to tell Terminal to execute an AppleScript to…)
TextEdit 1.1
TextEdit is a Cocoa application that serves as the SimpleText of Mac OS X. Unlike SimpleText, it can handle text exceeding 32K in length, and it is scriptable.
It contains the same Window class property name changes from TextEdit 1.0 in Mac OS X 10.0 as does Mail, as well as the same addition of the optional Each parameter to the Count command and the same omission of the Class property from several classes, because both are based on the Cocoa frameworks and inherited changes in those frameworks.
In addition, the Text Suite has seen some change. The Font, Color, and Size properties of the Text Attachment class have been removed, presumably because unnecessary; they remain available as properties of several other classes, such as the Character class.
URL Access Scripting 1.0.1 (v7)
The URL Access Scripting application, in /System/Library/ScriptingAdditions/, is a scripting addition with two commands allowing you to Download and Upload items from the Internet. Each command has a number of optional parameters to control the specifics of how this is done. Its dictionary remains unchanged since version 1.0 (v3) in Mac OS X 10.0.
WorldText 1.2
WorldText is Apple’s demonstration of MLTE, the Multi-Lingual Text Editor, a set of system facilities that makes it easier to write text applications for the modern world. It is installed in /Developer/Applications/Extras/ when you intall the Developer Tools CD. It is scriptable by dint of that certain third-party development environment that puts a scripting dictionary in your application if you forget to tell it not to. Its dictionary is unchanged from WorldText 1.1 in Mac OS X 10.0.
The Scriptable Finder
Finder 10.1 is found in /System/Library/CoreServices/. Its dictionary contains many changes from that of Finder 10.0. The many explicit warnings in the Finder 10.0 dictionary to the effect that terminology was preliminary and intended only for debugging are gone. The dictionary now seems largely complete in terms of terminology (save for two exceptions mentioned below), and only a few commands and other items are not yet functional. Finder scripting has come a long way since Mac OS X 10.0, but it still has a little way to go.
As in Mac OS X 10.0, there is a fake Finder application in the same location, whose version is given as Mac OS X Fake Finder 10.0. It is very small (4K on my hard drive) and is said by the Get Info panel to be a Classic application.
In Finder 10.1, you will find that only a few commands and other items are marked (NOT AVAILABLE YET) or, in one case, (NOT AVAILABLE, SUBJECT TO CHANGE) These are Copy (to the clipboard), Sort, the Clipboard and Finder Preferences properties of the Application class, Add To Favorites, Clean Up, Erase, the Expandable, Expanded and Completely Expanded properties of the Container class; the Clipping Window property of the Clipping class; the Preferences Window class; the Preferences class (this is the one that is marked SUBJECT TO CHANGE); the Label class; and the Icon Family class.
In addition, the Accepts High Level Events property of the Application File class is marked OBSOLETE, and it always returns true. This has to do with the nature of Mac OS X.
A new Legacy suite identifies [o]perations formerly handled by the Finder, but now automatically delegated to other applications. These are the Restart, Shut Down, and Sleep commands, and the Process, Application Process, and Desk Accessory Process classes. What is meant by automatically delegated to other applications isn’t altogether clear, but one point to note is that you can still issue these commands to the Finder in a ‘tell application Finder’ block. For example, I just ran ‘tell application Finder to get name of front process,’ and it returned loginwindow. (This demonstrates not only that it works, but also that we have a lot to learn about how Mac OS X works under the hood.) The application to which commands relating to processes are delegated is System Events, described below.
At least some of these legacy Finder commands are now handled by the System Events application, described elsewhere in this report. Apple’s official position is that these commands should still continue to be issued in ‘tell application Finder’ commands, not ‘tell application System Events’ commands, to avoid potential future problems in the event the System Events architecture is changed. (Apple reversed this position beginning with Mac OS X 10.2 (Jaguar), when System Events acquired much greater importance as the home of Folder Action commands and others.) The Finder redirects these events if you send them as named events. However, if you send them to the Finder as raw Apple events, AppleScript will generate undocumented error number -1799. 10/8/02
There are a number of other interesting and useful changes to the dictionary in Finder 10.1. By and large, scripting the Finder is rapidly becoming the pleasure we had grown used to in the classic Mac OS.
Desktop Picture is a new property in the Application class, providing a Finder reference to the file containing the desktop picture of the main monitor. It can be used to set the desktop picture, as well.
Displayed Name, Name Extension, and Extension Hidden are new properties of the Item class, allowing users to set and view the new options that are available in Mac OS X 10.1 for handling file name extensions.
Both versions of the Icon Size property (one returning an integer and the other returning the enumeration constants Mini, Small and Large) have been removed from the Container class, as has the Selection property. I am puzzled by the omission of the Selection property. It is still possible to get the selection of the Finder, but I am unable to set the selection.
Several new enumeration constants are available with the format property of the Disk class, namely, UFS Format, NFS Format, Audio Format, and WebDAV format.
A new read-only property, Ignore Privileges, has been added to the Disk class, allowing you to determine whether the user has selected the option to ignore permissions on the disk.
The Application File class has a new Opens In Classic property, indicating whether this application has been marked to open in the Classic environment when double clicked.
The Finder Window class has acquired three new properties, Current View, Icon View Options and List View Options. The latter two are read-only. Icon View returns one of three enumeration constants, Icon View, List View or Column View.
The Inspector Window class has been renamed the Information Window class, complying with a system-wide elimination of the old Next term, inspector, in favor of the more familiar Mac OS term, information. It retains only two of it old properties, Item and Current Panel, losing a bunch of properties that apparently appeared in error in the Finder 10.0 dictionary.
The Preferences Window class’s Current Panel property no longer lists a number of enumeration constants as return values, but instead the OS type ‘pple’. This is presumably an artifact of the fact that the class has not yet been implemented. A new Legacy Suite contains a number of commands that were handled by the Finder in previous versions of the Mac OS but that are now automatically delegated to other applications. You still use them in a Finder Tell block, but they will be executed by other applications. The commands in this suite are Restart, Shut Down and Sleep. The classes are Process, Application Process and Desk Accessory Process. None of these appeared in the Finder 10.0 dictionary.
Mac OS X v10.1 (Technical Note TN2029 10/15/01) has a page-long section devoted to additional AppleScript changes affecting the Finder.