SetScriptVariable
TheSetScriptVariablefunction sets the specified script variable for the specifed script system to the value of the input parameter.
FUNCTION SetScriptVariable (script: ScriptCode; selector: Integer; param: LongInt): OSErr;
script- A value that specifies the script system whose variable you are setting.
selector- A value that specifies a particular script variable.
param- The new value for the specified script variable.
DESCRIPTION
The actual values to be assigned may be long integers, standard integers, or signed bytes. If the value is not a long integer, you must store it in the low-order word or byte of theparamparameter and set the unused bytes to 0.The
SetScriptVariablefunction returns the valuesmBadVerbif the selector is not valid, andsmBadScriptif the script is invalid. Otherwise, it returns 0 (noErr).To specify the script variable whose value you wish to change, 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.RESULT CODES
noErr 0 No error smBadVerb -1 Invalid selector passed to the routine smBadScript -2 Invalid script code passed to the routine