Important: The information in this document is obsolete and should not be used for new development.
GetScriptVariable
TheGetScriptVariablefunction 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
AlthoughGetScriptVariablealways 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 byGetScriptVariable; the remaining bytes are set to 0.Valid selector values are defined by each script system.
GetScriptVariablereturns 0 if the selector value is invalid or if the specified script system is not installed.
To specify the script variable whose value you need, use one of the selector
- Note
- For some valid selectors, 0 may also be a valid return value.
For example, callingGetScriptVariablewith a selector ofsmScriptLangon a version of Macintosh system software that has been localized for the United States returns 0.![]()
constants listed on page 6-65. To specify the script system, use one of the
script-code constants listed on page 6-52.