Important: The information in this document is obsolete and should not be used for new development.
OSAGetDefaultScriptingComponent
You can use theOSAGetDefaultScriptingComponentfunction to get the subtype code for the default scripting component associated with an instance of the generic scripting component.
FUNCTION OSAGetDefaultScriptingComponent (genericScriptingComponent: ComponentInstance; VAR 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 function returns, in this parameter, the subtype code for the default scripting component associated with the instance of the generic scripting component specified in the
genericScriptingComponentparameter.DESCRIPTION
TheOSAGetDefaultScriptingComponentfunction returns the subtype code for the default scripting component. This is the scripting component that will be used byOSAStartRecording,OSACompile, orOSACompileExecuteif no existing script ID is specified. From the user's point of view, the default scripting component corresponds to the scripting language selected in the Script Editor application when the user first creates a new script.Each instance of the generic scripting component has its own default scripting component, which is initially AppleScript. You can use
OSASetDefaultScriptingComponentto change the default scripting component.RESULT CODES
noErr 0 No error errOSACantOpenComponent -1762 Can't connect to scripting component badComponentInstance $80008001 Invalid component instance