OSASetScriptInfo
You can use OSASetScriptInfo to set information about script data according to the value you pass in the selector parameter.
FUNCTION OSASetScriptInfo(scriptingComponent: ComponentInstance;
scriptID: OSAID;
selector: OSType;
value: LongInt): OSAError;
scriptingComponent
- A component instance created by a prior call to the Component Manager function
OpenDefaultComponent or OpenComponent (see page 10-4).
scriptID
- The script ID for the script data whose information is to be set.
selector
- A value that determines what kind of information
OSASetScriptInfo sets. All scripting components can accept this value:
CONST kOSAScriptIsModified = 'modi';
-
- The
kOSAScriptIsModified constant indicates that the count of changes since the script data was loaded or created should be set to the value in the value parameter. The AppleScript component provides limited support for this constant.
value
- The value to set.
DESCRIPTION
The OSASetScriptInfo function sets script information according to the value you pass in the selector parameter. If you use the kOSAScriptIsModified constant, OSASetScriptInfo sets a value that indicates how many times the script data has been modified since it was created or passed to OSALoad. Some scripting components may provide additional constants.
SPECIAL CONSIDERATIONS
Although you can specify kOSAScriptIsModified when you are using the AppleScript component without generating an error, the current version of AppleScript doesn't actually set a value for the count of changes since the script data was loaded or created. For more information, see the description of OSAGetScriptInfo that follows.
RESULT CODES
| noErr | 0 | No error |
| errOSASystemError | -1750 | General scripting system error |
| errOSAInvalidID | -1751 | Invalid script ID |
| errOSABadSelector | -1754 | Selector value not supported by scripting component |
| badComponentInstance | $80008001 | Invalid component instance |