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
Optional Scripting Component Routines / Manipulating the Create and Send Functions


OSASetDefaultTarget

You can use the OSASetDefaultTarget function to set the default target application for Apple events.

FUNCTION OSASetDefaultTarget
                        (scriptingComponent: ComponentInstance;
                         target: AEAddressDesc): OSAError;
scriptingComponent

A component instance created by a prior call to the Component Manager function OpenDefaultComponent or OpenComponent (see page 10-4).
target
The address of the application that is being made the default application. If you pass a null descriptor record in this parameter, the scripting component treats the current process as the default target.
DESCRIPTION
The OSASetDefaultTarget function establishes the default target application for Apple event sending and the default application from which the scripting component should obtain terminology information. For example, AppleScript statements that refer to the default application do not need to be enclosed in tell/end tell statements.

If your application doesn't call this function, or if you pass a null descriptor record in the target parameter, the scripting component treats the current process (that is, the application that calls OSAExecute or related routines) as the default target application.

RESULT CODES
noErr0No error
errOSASystemError-1750General scripting system error
badComponentInstance$80008001Invalid component instance

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996