![]() |
AppleScript Gestalt Selector and Attributes |
Header: Gestalt.h |
Used with the Gestalt function to determine whether AppleScript is available and to check for specific features.
enum { gestaltAppleScriptVersion = 'ascv' };
A selector you pass to the Gestalt function. If AppleScript is not present, the Gestalt function returns an error value; otherwise, it returns noErr and supplies, in the response parameter, a 32-bit AppleScript version number.
The low word of the 32-bit AppleScript version number specifies the current AppleScript version, while the high word specifies a compatibility version. For example, for AppleScript 1.3.7, which shipped with Mac OS 8.6, the value returned in the response parameter, viewed as a hex number, is 0x01100137. The low word, 0x0137, refers to the current AppleScript version. The high word, 0x0110, refers to the compatibility version numberscripts written for AppleScript versions 1.1.0 and later will run with AppleScript version 1.3.7.
The Discussion section provides additional information about AppleScript versions and features.
For System 7.0 and 7.1, AppleScript and the Apple Event Manager were optional installs. Starting with System 7.5, they are part of a standard install, so if youve already checked for the presence of System 7.5 or later, youll know that the Apple Event Manager is available, though AppleScript could be disabled using the Extensions Manager.
If you need features that are only available starting with a specific version of AppleScript, call Gestalt with the gestaltAppleScriptVersion selector to obtain the version number, then determine whether it is greater than or equal to the version your application requires.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)