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

Some scripting components provide routines that allow your application to set or get pointers to the create and send functions used by the scripting component when it sends and creates Apple events during script execution. If you do not set the pointers that specify these functions, the scripting component uses the standard AECreateAppleEvent and AESend functions with default parameters.

To gain control over the creation and addressing of Apple events, your application can provide its own create function for use by scripting components. To set a new create function, call the OSASetCreateProc function; to get the current create function, call OSAGetCreateProc.

The send function provided by your application can perform almost any action instead of or in addition to sending Apple events; for example, it can be used to facilitate concurrent script execution. To set a new send function, call the OSASetSendProc function; to get the current send function, call OSAGetSendProc.

The functions described in this section use the following types for pointers to the create and send functions:

TYPE 
   AESendProcPtr = ProcPtr;
   AECreateAppleEventProcPtr = ProcPtr;
For more information about create and send functions, see "Supplying Alternative Create and Send Functions," which begins on page 10-24.

Scripting components that support manipulation of the create and send functions also support the OSASetDefaultTarget function, which allows you to set the default application to which Apple events are sent.

A scripting component that supports the functions described in this section has the kOSASupportsAESending bit set in the componentFlags field of its component description record.


Subtopics
OSASetCreateProc
OSAGetCreateProc
OSASetSendProc
OSAGetSendProc
OSASetDefaultTarget

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996