Important: The information in this document is obsolete and should not be used for new development.
OSASetDefaultTarget
You can use theOSASetDefaultTarget
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 functionOpenDefaultComponent
orOpenComponent
(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
TheOSASetDefaultTarget
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 intell
/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 callsOSAExecute
or related routines) as the default target application.RESULT CODES
noErr 0 No error errOSASystemError -1750 General scripting system error badComponentInstance $80008001 Invalid component instance