Important: The information in this document is obsolete and should not be used for new development.
OSASetDefaultScriptingComponent
You can use theOSASetDefaultScriptingComponentfunction to set the default scripting component associated with an instance of the generic scripting component.
FUNCTION OSASetDefaultScriptingComponent (genericScriptingComponent: ComponentInstance; scriptingSubType: ScriptingComponentSelector) : OSAError;
genericScriptingComponent- A component instance for the generic scripting component, created by a prior call to the Component Manager function
OpenDefaultComponentorOpenComponent(see page 10-4).scriptingSubType- The subtype code for the scripting component you want to set as the default.
DESCRIPTION
TheOSASetDefaultScriptingComponentfunction sets the default scripting component for the specified instance of the generic scripting component to the scripting component identified by thescriptingSubTypeparameter.Each instance of the generic scripting component has its own default scripting component, which is initially AppleScript. You can use
OSAGetDefaultScriptingComponentto get the current default scripting component for an instance of the generic scripting component.RESULT CODES
noErr 0 No error errOSACantOpenComponent -1762 Specified component subtype hasn't been registered badComponentInstance $80008001 Invalid component instance