AppleScript 1.10 was released as part of Mac OS X version 10.4 and requires Mac OS X version 10.4 or later. Since this was the first Tiger release of AppleScript, there are a bunch of changes. Some are bug fixes, other are enhancements of existing features, and some are downright new.
Apple provided the usual disclaimer in their release note. It states that scripts written for older versions of AppleScript will work in 1.10 and that scripts written for 1.10 will work with versions back to version 1.1 if they don’t use features added since that version.¨
Notes:
Version Numbering
Since this is the first “double-digit” version of AppleScript, Apple noted that you must use the new considering numeric strings statement before comparing this version with previous versions. If you don’t, “1.10” will compare less than “1.9” in a normal string comparison.
If your script converts the version to a real number (via coercion) then you may also have problems, since the version number is now allowed to contain 2 digits for both the second and third digit. So now version 1.2.3 would coerce to 1.0203 instead of 1.23 as a real number. And 1.10 coerces to 1.10 and the previous version, 1.9.3 coerces to 1.0903 in order to keep 1.10 larger than 1.0903.
Apple suggests using the Gestalt version (system attribute “ascv”) to do version comparisons.
Strings
String concatenation has been changed to that if the strings being concatenated are of differing string types, the “richer” type is used for the result. This means that if you concatenate a plain string with a unicode text string, the result will be unicode text, since it supports more characters.
Strings containing only a “+” or “-” can no longer be coerced to a number (assumably zero).
Using count to get the number of paragraphs or text items of a unicode string now results in a value of 1, not 0. This is because the string is considered to contain at least 1 paragraph or text item, it just may be empty. This is different that the method used for standard text strings. With standard strings, the result is 0.
The implicitly encoded text types typeText, typeCString, and typePString have been deprecated since 1.9.2, but Apple reiterated this in their release notes. Bottom line: Don’t use them.
Do Shell Script
Do shell script should not be used with both administrator privileges AND the sudo shell command. If you do so, sudo will hang the script waiting for input on a non-existant terminal.
Do shell script now uses setuid-root for privileges to run scripts rather than root. Some things will operate differently because of this; perl will no longer accept -e options. This change could break existing scripts that rely on root privileges.
Error codes for do shell script are different. No information on HOW they are different.
Miscellaneous Changes
Path to me now returns the right path for compiled scripts even if they are run using the run script command.
Mount volume can no longer mount OS 9 server volumes using an AppleTalk server name. You must use the TCP server name or an IP address.
If you use display dialog with the with icon parameter and the icon doesn’t exist, Applescript will report an error. In the past, this was ignored.
The list returned by list disks is now unicode text, not standard text.
1.9.2.