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
Generic Scripting Component Routines / Getting and Setting the Default Scripting Component


OSAGetDefaultScriptingComponent

You can use the OSAGetDefaultScriptingComponent function 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 OpenDefaultComponent or OpenComponent (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 genericScriptingComponent parameter.
DESCRIPTION
The OSAGetDefaultScriptingComponent function returns the subtype code for the default scripting component. This is the scripting component that will be used by OSAStartRecording, OSACompile, or OSACompileExecute if 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 OSASetDefaultScriptingComponent to change the default scripting component.

RESULT CODES
noErr0No error
errOSACantOpenComponent-1762Can't connect to scripting component
badComponentInstance$80008001Invalid component instance

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996