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


SetScriptVariable

The SetScriptVariable function 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 the param parameter and set the unused bytes to 0.

The SetScriptVariable function returns the value smBadVerb if the selector is not valid, and smBadScript if 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
noErr0No error
smBadVerb -1Invalid selector passed to the routine
smBadScript-2Invalid script code passed to the routine

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996