This chapter provides information and sample code that will help you create and send Apple events and handle Apple events you receive in response to those you send. Before reading this chapter, you should be familiar with the information in “Building an Apple Event.”
Applications most commonly create and send Apple events for one of the reasons described in “When Applications Use Apple Events”: to communicate directly with other applications or to support recording in a scriptable application. And as described in “Two Approaches to Creating an Apple Event,” you can create an Apple event in one step with the AEBuildAppleEvent function, or you can create a possibly incomplete Apple event with AECreateAppleEvent, then add attributes and parameters to complete the event.
Note: “Two Approaches to Creating an Apple Event” also briefly describes a third approach, using stream-oriented calling conventions, and points to documentation for that approach.
Functions for Creating Apple Event Data Structures
Specifying a Target Address
Creating an Apple Event
Sending an Apple Event
Handling a Reply Apple Event
Last updated: 2007-10-31