AppleScript 1.6: What‘s New and Different from AppleScript 1.5.5

AppleScript 1.6 for Mac OS 9.1 can be installed in three ways: by using the Software Update control panel, by downloading the software from Apple Software Updates, and by running the Classic environment on a computer with Mac OS X.

AppleScript 1.6 for Mac OS 9.1 is functionally compatible with AppleScript 1.6 for Mac OS X, though there are differences in behavior due to differences between Mac OS 9.1 and Mac OS X.

What's New in AppleScript 1.6 and Different From AppleScript 1.5.5

AppleScript 1.6 for Mac OS 9.1 (like AppleScript 1.6 for Mac OS X) has several substantial changes and improvements from version 1.5.5, which is included with Mac OS 9.1. If you use the Unicode Text or Read/Write Commands features of AppleScript, you should quickly upgrade to AppleScript 1.6 for Mac OS 9.1. Like AppleScript 1.5.5, AppleScript 1.6 will function only with Mac OS 9.1 or later.

Stability and Reliability

AppleScript 1.6 fixes a long-standing issue in AppleScript in which scripts may claim to run out of memory, even when plenty of memory is available. AppleScript 1.4.3 and 1.5.5 also had rare issues with applets losing track of global variables; these issues have been fixed in AppleScript 1.6.

Support for Large Files in Read/Write Commands

The Read/Write commands in Standard Additions 1.6 now can work with files greater than 2 GB in size. In addition, all of the issues introduced in the Read/Write commands in AppleScript 1.5 and 1.5.5 have been fixed, and several long-standing issues with reading and writing lists and records have been fixed.

Note: AppleScript 1.6 introduces a known issue with the read command when using both the "as list" and "using delimiters" parameters. Where previous versions would return a list of strings, AppleScript 1.6 returns a list of one-item lists. Also, using the read command with the "before or until" parameter and an "as" parameter of a type other than text will return erroneous results. These issues will be addressed in a future release of AppleScript.

Support for Unicode

The Unicode text data type has been growing in functionality since version 1.3 and is now comparable in functionality with the string data type. Not only can Unicode text strings be received from and sent to applications, they display properly in the Results and Event Log windows of the Script Editor (and third-party editors); they can be accessed with the character, word, paragraph, and text item element classes and the first, last, middle, some, and every access forms; they can be operated on with the & (concatenation) operator; and they can be compared with the less than, greater than, less than or equal to, greater than or equal to, equals, contains, is contained by, begins with, and ends with operators. For text item elements of a Unicode string, the text item delimiters can be either string or Unicode text values. When comparing Unicode strings, the considering and ignoring constructs are supported for case, diacritical marks and punctuation.

Support for Mac OS X

AppleScript 1.6 supports many changes in general system operation introduced in Mac OS X. It can use applications and scripting additions that are stored as "bundles" or "packages" for Mac OS X. It can load scripts and application terminologies from files that do not have traditional Mac OS resource forks. It accommodates the fact that many Mac OS X applications actually have a ".app" filename extension that is hidden from the user.

No Dependence on Security Library

The Standard Additions functionality in AppleScript 1.5.5 depended on the presence of the Security Library system extension in order to function. In Standard Additions 1.6, if the Security Library is missing or disabled, only the mount volume command's ability to use the Keychain will be disabled, but all other Standard Additions features will be available.

Other Changes and Improvements

AppleScript 1.6 has improvements to the random number command, to make random numbers more evenly distributed and less predictable; it returns more correct results from certain unusual operations (item 0 of a list, set text item delimiters to {}, strings of a string, strings of a list that doesn't contain strings) where previous versions of AppleScript would return unhelpful results or fail to signal appropriate errors.

Note: AppleScript 1.6 introduces a known issue with using the mount volume command to mount volumes hosted on certain kinds of servers, especially computers with Windows 2000. This issue is expected to be addressed in a future version of AppleScript.

For More Information

To download AppleScript 1.6, see article 120001: "About AppleScript 1.6".

See the AppleScript Web site (http://www.apple.com/applescript/).

Published Date: Feb 19, 2012