Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 6 - Script Manager / Script Manager Reference
Routines / Checking and Setting Script Variables


GetScriptVariable

The GetScriptVariable function retrieves the value of the specified script variable from the specified script system.

FUNCTION GetScriptVariable (script: ScriptCode; 
                            selector: Integer): LongInt;
script
A value that specifies the script system whose variable you are accessing.
selector
A value that specifies a particular script variable.
DESCRIPTION
Although GetScriptVariable always returns a long integer, the actual value may be a long integer, standard integer, or signed byte. If the value is not a long integer, it is stored in the low-order word or byte of the long integer returned by GetScriptVariable; the remaining bytes are set to 0.

Valid selector values are defined by each script system. GetScriptVariable returns 0 if the selector value is invalid or if the specified script system is not installed.

Note
For some valid selectors, 0 may also be a valid return value.
For example, calling GetScriptVariable with a selector of smScriptLang on a version of Macintosh system software that has been localized for the United States returns 0.
To specify the script variable whose value you need, use one of the selector
constants listed on page 6-65. To specify the script system, use one of the
script-code constants listed on page 6-52.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996