Important: The information in this document is obsolete and should not be used for new development.
Chapter 5 - Creating and Sending Apple Events
This chapter describes how your application can use the Apple Event Manager to create and send Apple events. If you want to factor your application for recording, or if you want your application to send Apple events directly to other applications, you can use Apple Event Manager routines to create and send Apple events.Before you read this chapter, you should be familiar with the chapters "Introduction to Interapplication Communication," "Introduction to Apple Events," and "Responding to Apple Events" in this book. If you are factoring your application, you should also be familiar with the chapter "Recording Apple Events" in this book.
This chapter provides the basic information you need to create and send Apple events from your application. To send core and functional-area Apple events, your application must also be able to create object specifier records. For information about object specifier records, see the chapter "Resolving and Creating Object Specifier Records" in this book.
To allow your application to send Apple events to applications on other computers, you may wish to use the
PPCBrowser
function, which is described in the chapter "Program-to-Program Communications Toolbox" in this book.The first section in this chapter, "Creating an Apple Event," describes how to
The section "Sending an Apple Event" describes how to
- create an Apple event
- add parameters to an Apple event
- specify optional Apple event parameters
- specify a target address
- send an Apple event
- deal with timeouts
- write an idle function
- write a reply filter function
Chapter Contents
- Creating an Apple Event
- Adding Parameters to an Apple Event
- Specifying Optional Parameters for an Apple Event
- Specifying a Target Address
- Creating an Address Descriptor Record
- Addressing an Apple Event for Direct Dispatching
- Sending an Apple Event
- Dealing With Timeouts
- Writing an Idle Function
- Writing a Reply Filter Function
- Reference to Creating and Sending Apple Events
- Routines for Creating and Sending Apple Events
- Creating Apple Events
- Creating and Duplicating Descriptor Records
- Creating Descriptor Lists and AE Records
- Adding Items to Descriptor Lists
- Adding Data and Descriptor Records to AE Records
- Adding Parameters and Attributes to Apple Events
- Sending Apple Events
- Application-Defined Routines
- Summary of Creating and Sending Apple Events
- Pascal Summary
- Constants
- Data Types
- Routines for Creating and Sending Apple Events
- Creating Apple Events
- Creating and Duplicating Descriptor Records
- Creating Descriptor Lists and AE Records
- Adding Items to Descriptor Lists
- Adding Data and Descriptor Records to AE Records
- Adding Parameters and Attributes to Apple Events
- Sending Apple Events
- Application-Defined Routines
- C Summary
- Constants
- Data Types
- Routines for Creating and Sending Apple Events
- Creating Apple Events
- Creating and Duplicating Descriptor Records
- Creating Descriptor Lists and AE Records
- Adding Items to Descriptor Lists
- Adding Data and Descriptor Records to AE Records
- Adding Parameters and Attributes to Apple Events
- Sending Apple Events
- Application-Defined Routines
- Assembly-Language Summary
- Trap Macros
- Trap Macros Requiring Routine Selectors
- Result Codes