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

NEW FEATURES, CHANGES, AND LIMITATIONS IN APPLESCRIPT 1.8.1

In addition to AppleScript Studio, Mac OS X 10.1.2 features a new Do Shell Script command for scripting UNIX shell commands and scripts, complete with the ability to specify access as administrator and to provide an administrator password in order to avoid a dialog. In addition, the System Attribute command now optionally accepts a shell environment variable as a parameter instead of a Gestalt selector, to provide information about a user’s environment. If no parameter is provided, a list of environment variables is returned (namely, {HOME, SHELL, USER, LANG, PATH, __CF_USER_TEXT_ENCODING}). For example, ‘system attribute SHELL’ returns /bin/tcsh. These changes appear in the new version 1.8.1 of the Standard Additions scripting addition.

A new POSIX File class has also been added to Standard Additions 1.8.1, allowing you to obtain an AppleScript file object by passing in a slash-delimited UNIX path in the POSIX style recognized by shell commands and scripts, instead of the colon-delimited path normally required by AppleScript. This new class includes a POSIX Path property that returns a slash-delimited POSIX path for use with the Do Shell Script command. The AppleScript language has been enhanced so that all file and alias references work with the new POSIX File class. This allows easy conversion of a slash-delimited UNIX path to a colon-delimited AppleScript path, and vice versa. This is quite useful in AppleScript Studio, where the Path For command and many properties giving the locations of files within application bundles return slash-delimited paths that aren’t recognized by AppleScript commands unless converted using the POSIX Path class.

DOCUMENTATION FOR NEW APPLESCRIPT FEATURES

Apple published the AppleScript 1.8.1 for Mac OS X 10.1.2 - Release Notes shortly after the release of Mac OS X 10.1.2. At this writing, it is available as AppleCare KnowledgeBase Document 75206. 10/8/02

The AppleScript Studio documentation, including the new volume of Inside Mac OS X and release notes, is also available online.

TESTING WHETHER APPLESCRIPT 1.8.1 IS INSTALLED

We have said in every one of our reports on successive AppleScript versions in the Mac OS that, before using new features of AppleScript, careful writers of scripts intended for public distribution will want to determine which version of AppleScript is present on the user’s machine.

A good, universal way to determine whether AppleScript 1.8.1 is available is to use the following script:


on AppleScript181orNewer()
	tell application "Finder"
		to get system attribute "ascv"
	   return (result is greater than or equal to 17826177)
end AppleScript181orNewer

APPLESCRIPT TOOLS, SCRIPTING ADDITIONS, AND SCRIPTABLE APPLICATIONS

Scriptable components of Mac OS X remain unchanged except as noted here.

Finder 10.1.2
The dictionary of Finder 10.1.2, found in /System/Library/CoreServices/, appears to be unchanged. All of the items formerly marked NOT AVAILABLE are still unavailable.

Interface Builder 2.2 (v248)
Interface Builder was upgraded to version 2.2 (v248) from 2.1 by the December 2001 Developer Tools quarterly CD.

Internet Explorer 5.1.3 (3905)
The Microsoft Internet Explorer application comes with Mac OS X. It is currently at version 5.1.3 (3905), up from 5.1.2 (3707), but I didn’t check to see whether this was the result of installing Mac OS X 10.1.2 or installing IE separately.

Project Builder 1.1.1
Project Builder was upgraded to version 1.1.1 from 1.1 by the December 2001 Developer Tools quarterly CD.

SpeechRecognitionServer 3.0.2
SpeechRecognitionServer 3.0.1 has been upgraded to version 3.0.2. It
includes Speech Listener and Continuous Speech Listener, allowing your
scripts to listen for and respond to spoken commands. It remains at this rather daunting address:
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.
framework/Versions/A/Resources/SpeechRecognitionServer

This is now workable, however, because both SpeechRecognitionServer and SpeakableItems appear in the list of scriptable software when you use Script Editor to open dictionaries. Scripting it is easy; just ‘tell application SpeechRecognitionServer to’, although its dictionary is entitled Speech Recognition Server Dictionary (with spaces).

Standard Additions 1.8.1
The Standard Additions scripting addition is upgraded to version 1.8.1 from version 1.7. Its new features are described above.

Standard Additions no longer offers the Folder Actions commands, presumably because Folder Actions capability is still missing from Finder 10.1. I hope this does not mean that Folder Actions will never be implemented in Mac OS X.

StuffIt Expander 6.5.1
Aladdin Systems’ StuffIt Expander application is up to version 6.5.1 from 6.0.1. I don’t recall whether it was intalled by the Mac OS X 10.1.2 updater, but it is available for free from Aladdin Systems, in any event.

FIXED BUGS

A list of thirteen fixed AppleScript-related bugs in AppleScript 1.7 for Mac OS X is available in Apple’s AppleScript 1.8.1 for Mac OS X 10.1.2 - Release Notes and will not be repeated here.

NEW (AND OLD) BUGS

AppleScript 1.8 breaks the Mac OS X-native version of Script Debugger. Preliminary reports from users suggest that AppleScript 1.8.1 may have fixed this, but the final verdict is not yet in. According to the release notes, The only difference is that the problem of applets crashing when certain multimedia software is installed is fixed in version 1.8.1, and it states that there are some incompatibilities with third-party script editors.

A list of unresolved issues in AppleScript 1.8.1 appears in Apple’s AppleScript 1.8.1 for Mac OS X 10.1.2 - Release Notes and will not be repeated here.