- Core Services
The Apple Event Manager, a part of the Open Scripting Architecture (OSA), provides facilities for applications to send and respond to Apple events and to make their operations and data available to AppleScript scripts. For related API reference, see Open Scripting Architecture Reference.
An Apple event is a type of interprocess message that can specify complex operations and data. Apple events provide a data transport and event dispatching mechanism that can be used within a single application, between applications on the same computer, and between applications on different computers connected to a network.
Applications typically use Apple events to request services and information from other applications or to provide services and information in response to such requests. All applications that present a graphical interface to the user through the Human Interface Toolbox (Carbon applications) or the Cocoa application framework should be able to respond, if appropriate, to certain events sent by the Mac OS. These include the
open application (or
print documents, and
Some Apple Event Manager functions are marked as being thread safe—for all other functions, you should call them only on the main thread.
For an overview of technologies that take advantage of the Apple Event Manager, see AppleScript Overview.
For information on working with Apple events, including events sent by the Mac OS, see Responding to Apple Events in Apple Events Programming Guide. For information about individual four-character codes used in Apple events, see AppleScript Terminology and Apple Event Codes Reference.
The Apple Event Manager is implemented by the AE framework, a subframework of the Core Services framework. You don’t link directly with the AE framework—instead, you typically link with the Carbon framework, which includes it. Some AppleEvent definitions are only available to clients of the Carbon framework, which includes, for example,
AEInteraction in the HIToolbox framework.
The AE framework does not force a connection to the window server. This allows daemons and startup items that work with Apple events to continue working across log outs.
You can check for version and feature availability information by using the Apple Event Manager selectors defined in the Gestalt Manager. For more information see Inside macOS: Gestalt Manager Reference.