OSASetActiveProc
You can use the OSASetActiveProc routine to set the active function that a scripting component calls periodically while executing a script.
FUNCTION OSASetActiveProc(scriptingComponent: ComponentInstance;
activeProc: OSAActiveProcPtr;
refCon: LongInt): OSAError;
scriptingComponent
-
A component instance created by a prior call to the Component Manager function OpenDefaultComponent or OpenComponent (see page 10-4).
activeProc
- A pointer to the active function to set. If the value of this parameter is
NIL, OSASetActiveProc sets the scripting component's default active function.
refCon
- A reference constant to be associated with the active function. This parameter can be used for many purposes; for example, it could contain a handle to data used by the active function.
RESULT CODES
| noErr | 0 | No error |
| errOSASystemError | -1750 | General scripting system error |
| badComponentInstance | $80008001 | Invalid component instance |