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: Interapplication Communication /
Chapter 10 - Scripting Components / Scripting Components Reference
Required Scripting Component Routines / Setting and Getting Script Information


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
noErr0No error
errOSASystemError-1750General scripting system error
errOSAInvalidID-1751Invalid script ID
errOSABadSelector-1754Selector value not supported by scripting component
badComponentInstance$80008001Invalid component instance

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996