Important: The information in this document is obsolete and should not be used for new development.
OSAMakeContext
You can use theOSAMakeContextfunction to get a script ID for a new script context.
FUNCTION OSAMakeContext(scriptingComponent: ComponentInstance; contextName: AEDesc; parentContext: OSAID; VAR resultingContextID: OSAID): OSAError;
scriptingComponent- A component instance created by a prior call to the Component Manager function
OpenDefaultComponentorOpenComponent(see page 10-4).contextName- Name of new context. Some scripting components may use context names for semantic purposes. If the value of this parameter is
typeNull,OSAMakeContextcreates an unnamed context.parentContext- Existing context from which new context inherits bindings. If the value of this parameter is
kOSANullScript, the new context does not inherit bindings from any other context.resultingContextID- A script ID for the resulting script context.
DESCRIPTION
TheOSAMakeContextfunction creates a new script context that you may pass toOSAExecuteorOSAExecuteEvent. The new script context inherits the bindings of the script context specified in theparentContextparameter.SPECIAL CONSIDERATIONS
If you callOSAMakeContextusing an instance of the generic scripting component, the generic scripting component uses the default scripting component to create the new script context.RESULT CODES
SEE ALSO
To compile existing source data into a script context, useOSACompileas described on page 10-47.