

statements using AppleScript 1.6 or newer If system attribute "ascv" is greater than or equal to 17826144 then The integer, 17826144, stands for version 1.6, in Apple's decimal-coded hexadecimal versioning scheme.
#Macos years used runonly applescripts avoid mac os x#
Apple's discussion of the new System Attribute command does not address the bugs described here.Ī first cut at adapting the standard technique for use in Mac OS X simply eliminates the Finder Tell block, as shown in the following script. As a result, after tweaking it to work around the two new bugs, the basic approach of the standard technique continues to work in Mac OS X. Although the Computer command has been eliminated from the Finder's dictionary both in the Mac OS X environment and in the Classic environment, a new System Attribute command that is almost identical has been added to Standard Additions in the Mac OS X environment. The standard technique for determining the version of AppleScript in Mac OS 9.1 and earlier utilizes the Finder's Computer command, as explained in The AppleScript Sourcebook's report on AppleScript 1.3.4 (the technique was slightly modified for AppleScript 1.5.5, in a backward-compatible fashion).

In addition, unfortunately, two bugs in Mac OS X 10.0 make the task still more difficult, especially if what you want is a script that will run correctly in the Classic environment as well as under all other versions of the Mac OS. This task has become more complicated with the advent of Mac OS X, due only in part to the fact that different flavors of AppleScript 1.6 are installed in the Classic environment and in the Mac OS X environment. TESTING WHETHER APPLESCRIPT 1.6 IS INSTALLEDīefore 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.
