APPLESCRIPT-RELATED SYSTEM SOFTWARE COMPONENTS
Several new scriptable components are installed in Mac OS 9, as described in the New Features section, above.
In addition, a standard Mac OS 9 installation places these AppleScript-related items in the Apple Extras folder on your hard disk:
In the AppleScript folder, the new Script Editor 1.4.1, a short About AppleScript document explaining some of the new features of AppleScript 1.4, and the AppleScript Guide file.
In the ColorSync folder, a subfolder of scripts and a Sample Scripts ReadMe document. The document is for ColorSync 2.6; there are no significant new scripting features in ColorSync 3.0.
In the Font Extras folder, the new scriptable FontSync control panel and two scripts required to make use of its settings. 10/29/99
The Mac OS 9 CD contains these optional items related to AppleScript, which are not installed automatically by the standard Mac OS 9 installation but can be dragged from the CD:
In the AppleScript Extras folder: a light version of the iDo Script Scheduler 1.0 control panel (a newer and more powerful version, iDo Script Scheduler 1.1, is available commercially from the developer); an installer for the light version of OSA Menu (a more capable version, OSA Menu 1.2, is available free from the developer); all seven of the AppleScript Guidebook modules which have been available on the AppleScript web site for some time, with installers to add them to Apple Help; and a folder with More Sample Scripts arranged for use by OSA Menu (in Finder, Script Editor, Folder Actions and Universal subfolders), ready to be dragged into the Scripts folder in your System Folder. The additional scripts have not been revised since Mac OS 8.6. It also includes an About AppleScript CD Extras document which explains the contents of the AppleScript Extras folder, including the additional scripts.
In a subfolder of the HyperCard Update folder, which provides the 1997 HyperCard 2.4.1 udpate, the old HyperCard AppleScript Reference stack last modified in 1997.
In the OTExtras subfolder of the Network Extras folder, a Sample AppleScripts folder showing proper syntax to script the Network Setup Scripting application (including a NSS skeleton stationery pad to make it easier to write your own).
In the Remote Access subfolder of the Network Extras folder, a Sample AppleScripts folder for Remote Access.
In the Palm Extras folder of the Palm Desktop folder, an AppleScripts folder with useful scripts. 10/29/99
Several changes have been made to scriptable components of the Mac OS that have been updated from their Mac OS 8.6 versions. Most of the changes are minor, but more extensive changes have been made to the dictionaries for the File Sharing control panel application, the Remote Access Commands and Standard Additions scripting additions and the Apple System Profiler desk accessory application. 10/29/99
ColorSync Extension system extension
The version has increased to 3.0 from 2.6.1. The ‘saving into’ parameter is now ‘saving in’ in the ‘match’, ‘proof’ and ‘match link’ commands. I haven’t tested this, but I am confident that old scripts will continue to function without recompiling. The ‘get’ and ‘set’ commands have disappeared from the dictionary in accordance with the Mac OS 8.6 changes to the Standard Suite, but the commands are, of course, still available in AppleScript. 10/29/99
File Exchange control panel application
The version has increased to 3.0.3 from 3.0.1. The spelling of the ‘includes servers’ property of class ‘application’ has been corrected. In Mac OS 8.6, it was ‘includs servers’. I haven’t tested this, but I am confident that old scripts will continue to function without recompiling. 10/29/99
File Sharing control panel application
The version has increased to 9.0 from 8.0. It has been extensively revised, and the former Users & Groups control panel’s functionality and scripting dictionary have been incorporated into it. Old scripts using the Users & Groups dictionary must be revised to target File Sharing. The old Users & Groups suite has not changed. The File Sharing suite now includes new ‘close’, ‘delete’, ‘duplicate’ and ‘make’ commands. The dictionary indicates that the ‘disconnect’ command now takes a list of ‘connected user’ instead of a list of ‘anything’, and the ‘show privileges of’ command now takes a list of ‘shared item’ instead of a list of ‘anything’. Class ‘application’ now contains new ‘connected user’ and ‘shared item’ elements and the corresponding classes are provided. The ‘get’ and ‘set’ commands have disappeared in accordance with the Mac OS 8.6 changes to the Standard Suite, but the commands are, of course, still available in AppleScript. 10/29/99
Network Setup Scripting application in the Scripting Additions folder
The version has increased to 1.1.1 from 1.0.2. The dictionary now indicates that the ‘consequence’ property of the ‘transport options’ class in the Open Transport suite returns the constants ‘benign’, ‘may affect services’, ‘must restart configuration’, ‘must restart protocol’ and ‘must restart computer’, instead of the value ‘otgc’. There are also AppleTalk, Modem, Remote Access and TCP/IPv4 suites. 10/29/99
Remote Access Commands scripting addition
The version has increased to 3.5 from 3.1.3. Because Apple Remote Access 3.5 includes the personal server, the scripting dictionary has been enhanced with the addition of the ‘answer enabled’ and ‘is server’ properties of the ‘PPPStatusParam’ and ‘RAStatusParam’ classes. 10/29/99
Standard Additions scripting addition
The version has increased to 1.4 from 1.3.7. A new ‘choose URL’ command has been added to support the new ability of AppleScript to work over TCP/IP connections (for example, the Internet). Also, a new ‘busy status’ property has been added to the values returned in the ‘file information’ class by the ‘info for’ command, to let scripts determine whether a file is currently is use. In the Internet suite, the ‘schemes’ property of the ‘URL’ class returns several new constants, including ‘remote application URL’, ‘streaming multimedia URL’ and ‘network file system URL’. 10/29/99
URL Access Scripting application in the Scripting Additions folder
The version has increased to 2.0 from 1.0.1. The dictionary now indicates the default value of the several parameters to the ‘download’ and ‘upload’ commands. Apple’s AppleScript site was updated with a new AppleScript GuideBook help module for URL Access Scripting in January 2000. Apple published Technical Q&A NW 66 in April 2000, including information about undocumented error codes generated by the URL Access Manager which may be useful to AppleScripters using the URL Access scripting addition. 5/3/00
Apple System Profiler desktop accessory application
The version has increased to 2.4.2 from 2.2. The Apple System Profiler suite contains a great many additional classes, such as ‘System overview’ and ‘TCP information’, each with many properties allowing scripts to detect the presence of specific hardware and software features of the machine. The ‘Hardware overview’ class, for example, lets you determine the ‘LogicBoardNum’ in order to distinguish among various releases in a particular hardware model. The ‘ProductionOverview’ class even lets you determine the ‘SerialNumber’ of a specific machine (on my PowerBook G3 Series, it returns Not applicable; I guess Apple is planning for the future). The terminology style is not consistent with the prevailing AppleScript plain-English standard (many of the properties have no spaces between words but instead use embedded capitals to denote separate words), but the details made available to scripts is welcome. 10/29/99
Sherlock 2 application in the Apple Menu Items folder
The version has increased to 3.0.1 from 2.1, while the name has changed from Sherlock to Sherlock 2. Go figure. The ‘application’ class now contains a ‘channel’ element and a ‘current channel’ property, supported by a new ‘channel’ class reflecting the new channels feature of Sherlock 2. The ‘count’, ‘exists’, ‘get’ and ‘set’ commands have been added from the Standard suite. 10/29/99
The version has increased to 9.0 from 8.6. In the Standard suite, the ‘print’ command has a new, optional ‘with properties’ parameter. This is a record which may contain specific options supported by the drivers supplied with particular printers; see your printer’s documentation for details. This feature will become useful as more printer manufacturers or driver developers take advantage of the new scriptability features incorporated into the LaserWriter 8.7 file. The ‘application’, ‘container’, ‘sharable container’, ‘disk’, ‘folder’, ‘desktop-object’ and ‘trash-object’ classes contain a new ‘package’ element supported by a corresponding class. The ‘icon family’ class now includes the new ‘large 32 bit icon’ property, as well as new ‘large 8 bit mask’ and ‘small 8 bit mask’ properties. 10/29/99
The Scriptable Finder
Many long-standing bugs in the scriptable Finder, including some remaining from at least Mac OS 8.1, were not fixed in Mac OS 8.6. I listed what I regard as the eleven most important Finder bugs in the note on AppleScript 1.3.7 in Mac OS 8.6, along with three others. No fixes for Mac OS 9 are mentioned in Technote 1176.
Expanding on bug number 12 in my list, ‘move’ without designating a ‘to’ location not only moves the file to the desktop, but it doesn’t return a reference to its new location. The real bug, however, is that it is allowed to compile successfully, since the dictionary says the ‘to’ parameter is mandatory. 10/17/99
Preliminary testing indicates that the duplicate in place bug, number 2 in the list, has been fixed. The ‘duplicate’ command now returns a reference to the duplicated item even when it is a copy duplicated into the same folder as the original. None of the other bugs appears to have been addressed. 10/17/99
What was initially thought by many users to be a bug in the Finder’s icon positioning commands is now revealed, in Revision 2 of Technote 1176, to be a design change in the Finder’s behavior. The Mac OS 9 Finder does not allow icon positioning by way of AppleScript for icons appearing in icon views where either the ‘keep arranged’ or the ‘snap to grid’ option is turned on. If a script attempts to set the position of an icon in such a view, the Finder will return error code number -15274 (window wrong type). The error number will enable scripters to write error-trapping code into their scripts. Jon Pugh was the first to report this behavior, pointing out that one can work around it by turning off ‘keep arranged’ and ‘snap to grid’ before setting an icon’s position. 12/24/99
In January 2000, Apple released QuickTIme 4.1 and a very scriptable version of QuickTime Player. The release was accompanied by an extensive collection of AppleScript Scripts for QuickTime 4.1. The preliminary documentation for QuickTime 4.1, released shortly later, includes a chapter on AppleScript support in the Player. QuickTime 4.1: About AppleScript and QuickTime Player (TIL #60687 1/18/00, updated 1/20/00) describes the new scriptable QuickTime Player. Technote 1197, QuickTime 4.1.1/4.1.2, includes a note that QuickTime 4.1.1 fixed two AppleScript bugs in QuickTime Player: the frontmost window was not getting targeted by default, and the Close Every Window command would fail with an error. 5/23/00