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


OSASetDefaultScriptingComponent

You can use the OSASetDefaultScriptingComponent function 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 OpenDefaultComponent or OpenComponent (see page 10-4).
scriptingSubType
The subtype code for the scripting component you want to set as the default.
DESCRIPTION
The OSASetDefaultScriptingComponent function sets the default scripting component for the specified instance of the generic scripting component to the scripting component identified by the scriptingSubType parameter.

Each instance of the generic scripting component has its own default scripting component, which is initially AppleScript. You can use OSAGetDefaultScriptingComponent to get the current default scripting component for an instance of the generic scripting component.

RESULT CODES
noErr0No error
errOSACantOpenComponent-1762Specified component subtype hasn't been registered
badComponentInstance$80008001Invalid component instance

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996