Apple Event Manager

Overview

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 launch), reopen, open documents, print documents, and quit events.

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.h 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.

Gestalt Constants

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.

Topics

Adding Items to Descriptor Lists

AEPutArray

Inserts the data for an Apple event array into a descriptor list, replacing any previous descriptors in the list.

AEPutDesc

Adds a descriptor to any descriptor list, possibly replacing an existing descriptor in the list.

AEPutPtr

Inserts data specified in a buffer into a descriptor list as a descriptor, possibly replacing an existing descriptor in the list.

Adding Parameters and Attributes to Apple Events and Apple Event Records

AEPutAttributeDesc

Adds a descriptor and a keyword to an Apple event as an attribute.

AEPutAttributePtr

Adds a pointer to data, a descriptor type, and a keyword to an Apple event as an attribute.

AEPutKeyDesc

Inserts a descriptor and a keyword into an Apple event record as an Apple event parameter.

AEPutKeyPtr

Inserts data, a descriptor type, and a keyword into an Apple event record as an Apple event parameter.

AEPutParamDesc

Inserts a descriptor and a keyword into an Apple event or Apple event record as an Apple event parameter.

AEPutParamPtr

Inserts data, a descriptor type, and a keyword into an Apple event or Apple event record as an Apple event parameter.

Coercing Descriptor Types

AECoerceDesc

Coerces the data in a descriptor to another descriptor type and creates a descriptor containing the newly coerced data.

AECoercePtr

Coerces data to a desired descriptor type and creates a descriptor containing the newly coerced data.

Counting the Items in Descriptor Lists

AECountItems

Counts the number of descriptors in a descriptor list.

Creating an Apple Event

AECreateAppleEvent

Creates an Apple event with several important attributes but no parameters.

Creating and Duplicating Descriptors

AECreateDesc

Creates a new descriptor that incorporates the specified data.

AECreateDescFromExternalPtr

Creates a new descriptor that uses a memory buffer supplied by the caller.

AEDuplicateDesc

Creates a copy of a descriptor.

Creating, Calling, and Deleting Universal Procedure Pointers

DisposeAECoerceDescUPP

Disposes of a universal procedure pointer to a function that coerces data stored in a descriptor.

DisposeAECoercePtrUPP

Disposes of a universal procedure pointer to a function that coerces data stored in a buffer.

DisposeAEDisposeExternalUPP

Disposes of a universal procedure pointer to a function that disposes of data supplied to the AECreateDescFromExternalPtr function.

DisposeAEEventHandlerUPP

Disposes of a universal procedure pointer to an event handler function.

DisposeOSLAccessorUPP

Disposes of a universal procedure pointer to an object accessor function.

DisposeOSLAdjustMarksUPP

Disposes of a universal procedure pointer to an object callback adjust marks function.

DisposeOSLCompareUPP

Disposes of a universal procedure pointer to an object callback comparison function.

DisposeOSLCountUPP

Disposes of a universal procedure pointer to an object callback count function.

DisposeOSLDisposeTokenUPP

Disposes of a universal procedure pointer to an object callback dispose token function.

DisposeOSLGetErrDescUPP

Disposes of a universal procedure pointer to an object callback get error descriptor function.

DisposeOSLGetMarkTokenUPP

Disposes of a universal procedure pointer to an object callback get mark function.

DisposeOSLMarkUPP

Disposes of a universal procedure pointer to an object callback mark function.

InvokeAECoerceDescUPP

Calls a universal procedure pointer to a function that coerces data stored in a descriptor.

InvokeAECoercePtrUPP

Calls a universal procedure pointer to a function that coerces data stored in a buffer.

InvokeAEDisposeExternalUPP

Calls a dispose external universal procedure pointer.

InvokeAEEventHandlerUPP

Calls an event handler universal procedure pointer.

InvokeOSLAccessorUPP

Calls an object accessor universal procedure pointer.

InvokeOSLAdjustMarksUPP

Calls an object callback adjust marks universal procedure pointer.

InvokeOSLCompareUPP

Calls an object callback comparison universal procedure pointer.

InvokeOSLCountUPP

Calls an object callback count universal procedure pointer.

InvokeOSLDisposeTokenUPP

Calls an object callback dispose token universal procedure pointer.

InvokeOSLGetErrDescUPP

Calls an object callback get error descriptor universal procedure pointer.

InvokeOSLGetMarkTokenUPP

Calls an object callback get mark universal procedure pointer.

InvokeOSLMarkUPP

Calls an object callback mark universal procedure pointer.

NewAECoerceDescUPP

Creates a new universal procedure pointer to a function that coerces data stored in a descriptor.

NewAECoercePtrUPP

Creates a new universal procedure pointer to a function that coerces data stored in a buffer.

NewAEDisposeExternalUPP

Creates a new universal procedure pointer to a function that disposes of data stored in a buffer.

NewAEEventHandlerUPP

Creates a new universal procedure pointer to an event handler function.

NewOSLAccessorUPP

Creates a new universal procedure pointer to an object accessor function.

NewOSLAdjustMarksUPP

Creates a new universal procedure pointer to an object callback adjust marks function.

NewOSLCompareUPP

Creates a new universal procedure pointer to an object callback comparison function.

NewOSLCountUPP

Creates a new universal procedure pointer to an object callback count function.

NewOSLDisposeTokenUPP

Creates a new universal procedure pointer to an object callback dispose token function.

NewOSLGetErrDescUPP

Creates a new universal procedure pointer to an object callback get error descriptor function.

NewOSLGetMarkTokenUPP

Creates a new universal procedure pointer to an object callback get mark function.

NewOSLMarkUPP

Creates a new universal procedure pointer to an object callback mark function.

Creating Descriptor Lists and Apple Event Records

AECreateList

Creates an empty descriptor list or Apple event record.

Creating Object Specifiers

CreateCompDescriptor

Creates a comparison descriptor that specifies how to compare one or more Apple event objects with either another Apple event object or a descriptor.

CreateLogicalDescriptor

Creates a logical descriptor that specifies a logical operator and one or more logical terms for the Apple Event Manager to evaluate.

CreateObjSpecifier

Assembles an object specifier that identifies one or more Apple event objects, from other descriptors.

CreateOffsetDescriptor

Creates an offset descriptor that specifies the position of an element in relation to the beginning or end of its container.

CreateRangeDescriptor

Creates a range descriptor that specifies a series of consecutive elements in the same container.

Deallocating Memory for Descriptors

AEDisposeDesc

Deallocates the memory used by a descriptor.

Deallocating Memory for Tokens

AEDisposeToken

Deallocates the memory used by a token.

Deleting Descriptors

AEDeleteItem

Deletes a descriptor from a descriptor list, causing all subsequent descriptors to move up one place.

AEDeleteKeyDesc

Deletes a keyword-specified parameter from an Apple event record.

AEDeleteParam

Deletes a keyword-specified parameter from an Apple event record.

Getting, Calling, and Removing Object Accessor Functions

AECallObjectAccessor

Invokes the appropriate object accessor function for a specific desired type and container type.

AEGetObjectAccessor

Gets an object accessor function from an object accessor dispatch table.

AEInstallObjectAccessor

Adds or replaces an entry for an object accessor function to an object accessor dispatch table.

AERemoveObjectAccessor

Removes an object accessor function from an object accessor dispatch table.

Getting Data or Descriptors From Apple Events and Apple Event Records

AEGetAttributeDesc

Gets a copy of the descriptor for a specified Apple event attribute from an Apple event; typically used when your application needs to pass the descriptor on to another function.

AEGetAttributePtr

Gets a copy of the data for a specified Apple event attribute from an Apple event; typically used when your application needs to work with the data directly.

AEGetKeyDesc

Gets a copy of the descriptor for a keyword-specified Apple event parameter from an Apple event record

AEGetKeyPtr

Gets a copy of the data for a specified Apple event parameter from an Apple event record.

AEGetParamDesc

Gets a copy of the descriptor for a keyword-specified Apple event parameter from an Apple event or an Apple event record.

AEGetParamPtr

Gets a copy of the data for a specified Apple event parameter from an Apple event or an Apple event record.

Getting Information About the Apple Event Manager

AEManagerInfo

Provides information about the version of the Apple Event Manager currently available or the number of processes that are currently recording Apple events.

Getting Items From Descriptor Lists

AEGetArray

Extracts data from an Apple event array created with the AEPutArray function and stores it as a standard array of fixed size items in the specified buffer.

AEGetNthDesc

Copies a descriptor from a specified position in a descriptor list into a specified descriptor; typically used when your application needs to pass the extracted data to another function as a descriptor.

AEGetNthPtr

Gets a copy of the data from a descriptor at a specified position in a descriptor list; typically used when your application needs to work with the extracted data directly.

Getting the Sizes and Descriptor Types of Descriptors

AESizeOfAttribute

Gets the size and descriptor type of an Apple event attribute from a descriptor of type AppleEvent.

AESizeOfKeyDesc

Gets the size and descriptor type of an Apple event parameter from a descriptor of type AERecord.

AESizeOfNthItem

Gets the data size and descriptor type of the descriptor at a specified position in a descriptor list.

AESizeOfParam

Gets the size and descriptor type of an Apple event parameter from a descriptor of type AERecord or AppleEvent.

Initializing the Object Support Library

AEObjectInit

Initializes the Object Support Library.

AESetObjectCallbacks

Specifies the object callback functions for your application.

Locating Processes on Remote Computers

Available starting in macOS version v10.3, these functions allow you to locate processes on remote computers (a task supported by the PPCToolbox in Mac OS 9).

AECreateRemoteProcessResolver

Creates an object for resolving a list of remote processes.

AEDisposeRemoteProcessResolver

Disposes of an AERemoteProcessResolverRef.

AERemoteProcessResolverGetProcesses

Returns an array of objects containing information about processes running on a remote machine.

AERemoteProcessResolverScheduleWithRunLoop

Schedules a resolver for execution on a given run loop in a given mode.

Managing Apple Event Dispatch Tables

AEGetEventHandler

Gets an event handler from an Apple event dispatch table.

AEInstallEventHandler

Adds an entry for an event handler to an Apple event dispatch table.

AERemoveEventHandler

Removes an event handler entry from an Apple event dispatch table.

Managing Coercion Handler Dispatch Tables

AEGetCoercionHandler

Gets the coercion handler for a specified descriptor type.

AEInstallCoercionHandler

Installs a coercion handler in either the application or system coercion handler dispatch table.

AERemoveCoercionHandler

Removes a coercion handler from a coercion handler dispatch table.

Managing Special Handler Dispatch Tables

AEGetSpecialHandler

Gets a specified handler from a special handler dispatch table.

AEInstallSpecialHandler

Installs a callback function in a special handler dispatch table.

AERemoveSpecialHandler

Removes a handler from a special handler dispatch table.

Operating On Descriptor Data

AEGetDescData

Gets the data from the specified descriptor.

AEGetDescDataSize

Gets the size, in bytes, of the data in the specified descriptor.

AEGetDescDataRange

Retrieves a specified series of bytes from the specified descriptor.

AEReplaceDescData

Copies the specified data into the specified descriptor, replacing any previous data.

Resolving Object Specifiers

AEResolve

Resolves an object specifier.

Creating Apple Event Structures in Memory

AEBuildAppleEvent

Constructs an entire Apple event in a single call.

AEBuildDesc

Provides a facility for compiling AEBuild descriptor strings into Apple event descriptors (AEDesc).

AEBuildParameters

Adds additional parameters or attributes to an existing Apple event.

AEPrintDescToHandle

Provides a pretty printer facility for displaying the contents of Apple event descriptors.

vAEBuildAppleEvent

Allows you to encapsulate calls to AEBuildAppleEvent in a wrapper routine.

vAEBuildDesc

Allows you to encapsulate calls to AEBuildDesc in your own wrapper routines.

vAEBuildParameters

Allows you to encapsulate calls to AEBuildParameters in your own stdarg-style wrapper routines, using techniques similar to those allowed by vsprintf.

Creating Apple Event Structures Using Streams

AEStreamClose

Closes and deallocates an AEStreamRef.

AEStreamCloseDesc

Marks the end of a descriptor in an AEStreamRef.

AEStreamCloseList

Marks the end of a list of descriptors in an AEStreamRef.

AEStreamCloseRecord

Marks the end of a record in an AEStreamRef.

AEStreamCreateEvent

Creates a new Apple event and opens a stream for writing data to it.

AEStreamOpen

Opens a new AEStreamRef for use in building a descriptor.

AEStreamOpenDesc

Marks the beginning of a descriptor in an AEStreamRef.

AEStreamOpenEvent

Opens a stream for an existing Apple event.

AEStreamOpenKeyDesc

Marks the beginning of a key descriptor in an AEStreamRef.

AEStreamOpenList

Marks the beginning of a descriptor list in an AEStreamRef.

AEStreamOpenRecord

Marks the beginning of an Apple event record in an AEStreamRef.

AEStreamOptionalParam

Designates a parameter in an Apple event as optional.

AEStreamSetRecordType

Sets the type of the most recently created record in an AEStreamRef.

AEStreamWriteAEDesc

Copies an existing descriptor into an AEStreamRef.

AEStreamWriteData

Appends data to the current descriptor in an AEStreamRef.

AEStreamWriteDesc

Appends the data for a complete descriptor to an AEStreamRef.

AEStreamWriteKey

Marks the beginning of a keyword/descriptor pair for a descriptor in an AEStreamRef.

AEStreamWriteKeyDesc

Writes a complete keyword/descriptor pair to an AEStreamRef.

Working With Lower Level Apple Event Functions

AEGetRegisteredMachPort

Returns the Mach port (in the form of a mach_port_t) that was registered with the bootstrap server for this process.

AEDecodeMessage

Decodes a Mach message and converts it into an Apple event and its related reply.

AESendMessage

Sends an AppleEvent to a target process without some of the overhead required by AESend.

AEProcessMessage

Decodes and dispatches a low level Mach message event to an event handler, including packaging and returning the reply to the sender.

Serializing Apple Event Data

AESizeOfFlattenedDesc

Returns the amount of buffer space needed to store the descriptor after flattening it.

AEFlattenDesc

Flattens the specified descriptor and stores the data in the supplied buffer.

AEUnflattenDesc

Unflattens the data in the passed buffer and creates a descriptor from it.

Miscellaneous

AECheckIsRecord

Determines whether a descriptor is truly an AERecord.

AEInitializeDesc

Initializes a new descriptor.

Callbacks

AERemoteProcessResolverCallback

Defines a pointer to a function the Apple Event Manager calls when the asynchronous execution of a remote process resolver completes, either due to success or failure, after a call to the AERemoteProcessResolverScheduleWithRunLoop function. Your callback function can use the reference passed to it to get the remote process information.

AEDisposeExternalProcPtr

Defines a pointer to a function the Apple Event Manager calls to dispose of a descriptor created by the AECreateDescFromExternalPtr function. Your callback function disposes of the buffer you originally passed to that function.

AECoerceDescProcPtr

Defines a pointer to a function that coerces data stored in a descriptor. Your descriptor coercion callback function coerces the data from the passed descriptor to the specified type, returning the coerced data in a second descriptor.

AECoercePtrProcPtr

Defines a pointer to a function that coerces data stored in a buffer. Your pointer coercion callback routine coerces the data from the passed buffer to the specified type, returning the coerced data in a descriptor.

AEEventHandlerProcPtr

Defines a pointer to a function that handles one or more Apple events. Your Apple event handler function performs any action requested by the Apple event, adds parameters to the reply Apple event if appropriate (possibly including error information), and returns a result code.

OSLAccessorProcPtr

Your object accessor function either finds elements or properties of an Apple event object.

OSLAdjustMarksProcPtr

Defines a pointer to an adjust marks callback function. Your adjust marks function unmarks objects previously marked by a call to your marking function.

OSLCompareProcPtr

Defines a pointer to an object comparison callback function. Your object comparison function compares one Apple event object to another or to the data for a descriptor.

OSLCountProcPtr

Defines a pointer to an object counting callback function. Your object counting function counts the number of Apple event objects of a specified class in a specified container object.

OSLDisposeTokenProcPtr

Defines a pointer to a dispose token callback function. Your dispose token function, required only if you use a complex token format, disposes of the specified token.

OSLGetErrDescProcPtr

Defines a pointer to an error descriptor callback function. Your error descriptor callback function supplies a pointer to an address where the Apple Event Manager can store the current descriptor if an error occurs during a call to the AEResolve function.

OSLGetMarkTokenProcPtr

Defines a pointer to a mark token callback function. Your mark token function returns a mark token.

OSLMarkProcPtr

Defines a pointer to an object marking callback function. Your object-marking function marks a specific Apple event object.

Data Types

AEArrayData

Stores array information to be put into a descriptor list with the AEPutArray function or extracted from a descriptor list with the AEGetArray function.

AEBuildError

Defines a structure for storing additional error code information for “AEBuild” routines.

AEDesc

Stores data and an accompanying descriptor type to form the basic building block of all Apple Events.

AEKeyDesc

Associates a keyword with a descriptor to form a keyword-specified descriptor.

AERemoteProcessResolverContext

Supplied as a parameter when performing asynchronous resolution of remote processes.

ccntTokenRecord

Stores token information used by the AEResolve function while locating a range of objects.

IntlText

International text consists of an ordered series of bytes, beginning with a 4-byte language code and a 4-byte script code that together determine the format of the bytes that follow.

OffsetArray

Specifies offsets of ranges of text. Not typically used by developers.

TextRange

Specifies a range of text. Not typically used by developers.

TextRangeArray

Specifies an array of text ranges. Not typically used by developers.

TScriptingSizeResource

Defines a data type to store stack and heap information. Not typically used by developers.

AEAddressDesc

A descriptor that contains the address of an application. Typically used to describe the target application for an Apple event.

AEArrayDataPointer

A pointer to a union of type AEArrayData.

AEArrayType

Stores a value that specifies an array type.

AECoerceDescUPP

Defines a data type for the universal procedure pointer for the AECoerceDescProcPtr callback function pointer.

AECoercePtrUPP

Defines a data type for the universal procedure pointer for the AECoercePtrProcPtr callback function pointer.

AECoercionHandlerUPP

Defines a data type for the universal procedure pointer for the AECoercionHandlerUPP callback function pointer.

AEDataStorage

A pointer to an opaque data type that provides storage for an AEDesc descriptor.

AEDataStorageType

An opaque data type used to store data in Apple event descriptors.

AEDescList

A descriptor whose data consists of a list of one or more descriptors.

AEEventSource

A data type for values that specify how an Apple event was delivered.

AEDisposeExternalUPP

Defines a universal procedure pointer to a function the Apple Event Manager calls to dispose of a descriptor created by the AECreateDescFromExternalPtr function.

AEEventClass

Specifies the event class of an Apple event.

AEEventHandlerUPP

Defines a data type for the universal procedure pointer for the AEEventHandlerUPP callback function pointer.

AEEventID

Specifies the event ID of an Apple event.

AEKeyword

A four-character code that uniquely identifies a descriptor in an Apple event record or an Apple event.

AERecord

A descriptor whose data is a list of keyword-specified descriptors.

AERemoteProcessResolverRef

An opaque reference to an object that encapsulates the mechanism for obtaining a list of processes running on a remote machine.

AEReturnID

Specifies a return ID for a created Apple event.

AESendOptions

This data type is not available.

AESendPriority

Specifies the processing priority for a sent Apple event.

AEStreamRef

An opaque data structure for storing stream-based descriptor data.

AETransactionID

Specifies a transaction ID.

AppleEvent

A descriptor whose data is a list of descriptors containing both attributes and parameters that make up an Apple event.

DescType

Specifies the type of the data stored in an AEDesc descriptor.

OffsetArrayHandle

Defines a data type that points to an OffsetArray. Not typically used by developers.

OSLAccessorUPP

Defines a data type for the universal procedure pointer for the OSLAccessorProcPtr callback function pointer.

OSLAdjustMarksUPP

Defines a data type for the universal procedure pointer for the OSLAdjustMarksProcPtr callback function pointer.

OSLCompareUPP

Defines a data type for the universal procedure pointer for the OSLCompareProcPtr callback function pointer.

OSLCountUPP

Defines a data type for the universal procedure pointer for the OSLCountProcPtr callback function pointer.

OSLDisposeTokenUPP

Defines a data type for the universal procedure pointer for the OSLDisposeTokenProcPtr callback function pointer.

OSLGetErrDescUPP

Defines a data type for the universal procedure pointer for the OSLGetErrDescProcPtr callback function pointer.

OSLGetMarkTokenUPP

Defines a data type for the universal procedure pointer for the OSLGetMarkTokenProcPtr callback function pointer.

OSLMarkUPP

Defines a data type for the universal procedure pointer for the OSLMarkProcPtr callback function pointer.

Constants

AEBuildErrorCode

Represents syntax errors found by an “AEBuild” routine.

AESendMode

Specify send preferences to the AESend function.

Apple Event Recording Event ID Constants

Specify event IDs for events that deal with Apple event recording.

Callback Constants for the AEResolve Function

Specify supported callback features to the AEResolve function.

Comparison Operator Constants

Specify a comparison operation to perform on two operands.

Constants for Object Specifiers, Positions, and Logical and Comparison Operations

Specify the types of the four keyword-specified descriptors that make up the data in an object specifier, as well as constants for position, logical operations, and comparison operations.

Data Array Constants

Specify an array type for storing or extracting descriptor lists with the AEPutArray and AEGetArray functions.

Descriptor Type Constants

Specify types for descriptors.

Event Class Constants

Specify the event class for an Apple event.

Event ID Constants

Specify the event ID for an Apple event.

Event Source Constants

Identify how an Apple event was delivered.

ID Constants for the AECreateAppleEvent Function

Specify values for the ID parameters of the AECreateAppleEvent function.

Key Form and Descriptor Type Object Specifier Constants

Specify possible values for the keyAEKeyForm field of an object specifier, as well as descriptor types used in resolving object specifiers.

Keyword Attribute Constants

Specify keyword values for Apple event attributes.

Keyword Parameter Constants

Specify keyword values for Apple event parameters, as well as information for the AEManagerInfo function to retrieve. Some common key word values are shown here.

Launch Apple Event Constants

In a kAEOpenApplication event, specify information about how the receiving application was launched.

Numeric Descriptor Type Constants

Specify types for numeric descriptors.

Object Class ID Constants

Specify the object class for an Apple event object.

Other Descriptor Type Constants

Specify types for Boolean and character descriptors.

Priority Constants for the AESend Function (Deprecated in macOS)

Specify a value for the sendPriority parameter of the AESend function.

Remote Process Dictionary Keys

Used to extract information from dictionaries with entries that describe remote processes.

Special Handler Callback Constants

Specify an object callback function to install, get, or remove from the special handler dispatch table.

Timeout Constants

Specify a timeout value.

kAEUseHTTPProxyAttr

Web Services Proxy support—these constants should be added as attributes of the event that is being sent (not as part of the direct object).

kTSMHiliteCaretPosition

Specify text highlighting information.

typeApplicationBundleID

For specifying a target application by bundle ID.

typeKernelProcessID

For specifying an application by UNIX process ID.

typeMachPort

For specifying a Mach port.

Result Codes

Because the Apple Event Manager uses the services of the Event Manager, the functions described in this document may return Event Manager result codes in addition to the Apple Event Manager result codes listed here. Less commonly, an Apple Event Manager function may return other result codes, including some of those found in the CarbonCore header file MacErrors.h.

For result codes for the AEBuild-related functions, see AEBuildErrorCode.

noPortErr

Client hasn’t set 'SIZE' resource to indicate awareness of high-level events

destPortErr

Server hasn’t set 'SIZE' resource to indicate awareness of high-level events, or else is not present

sessClosedErr

The kAEDontReconnect flag in the sendMode parameter was set and the server quit, then restarted

errAECoercionFail

Data could not be coerced to the requested descriptor type

errAEDescNotFound

Descriptor was not found

errAECorruptData

Data in an Apple event could not be read

errAEWrongDataType

Wrong descriptor type

errAENotAEDesc

Not a valid descriptor

errAEBadListItem

Operation involving a list item failed

errAENewerVersion

Need a newer version of the Apple Event Manager

errAENotAppleEvent

The event is not in AppleEvent format.

errAEEventNotHandled

Event wasn’t handled by an Apple event handler

errAEReplyNotValid

AEResetTimer was passed an invalid reply

errAEUnknownSendMode

Invalid sending mode was passed

errAEWaitCanceled

User canceled out of wait loop for reply or receipt

errAETimeout

Apple event timed out

errAENoUserInteraction

No user interaction allowed

errAENotASpecialFunction

Wrong keyword for a special function

errAEParamMissed

A required parameter was not accessed.

errAEUnknownAddressType

Unknown Apple event address type

errAEHandlerNotFound

No handler found for an Apple event

errAEReplyNotArrived

Reply has not yet arrived

errAEIllegalIndex

Not a valid list index

errAEImpossibleRange

The range is not valid because it is impossible for a range to include the first and last objects that were specified; an example is a range in which the offset of the first object is greater than the offset of the last object

errAEWrongNumberArgs

The number of operands provided for the kAENOT logical operator is not 1

errAEAccessorNotFound

There is no object accessor function for the specified object class and container type

errAENoSuchLogical

The logical operator in a logical descriptor is not kAEAND, kAEOR, or kAENOT

errAEBadTestKey

The descriptor in a test key is neither a comparison descriptor nor a logical descriptor

errAENotAnObjectSpec

The objSpecifier parameter of AEResolve is not an object specifier

errAENoSuchObject

Runtime resolution of an object failed.

errAENegativeCount

An object-counting function returned a negative result

errAEEmptyListContainer

The container for an Apple event object is specified by an empty list

errAEUnknownObjectType

The object type isn’t recognized

errAERecordingIsAlreadyOn

Recording is already on

errAEReceiveTerminate

Break out of all levels of AEReceive to the topmost (1.1 or greater)

errAEReceiveEscapeCurrent

Break out of lowest level only of AEReceive (1.1 or greater)

errAEEventFiltered

Event has been filtered and should not be propagated (1.1 or greater)

errAEDuplicateHandler

Attempt to install handler in table for identical class and ID (1.1 or greater)

errAEStreamBadNesting

Nesting violation while streaming

errAEStreamAlreadyConverted

Attempt to convert a stream that has already been converted

errAEDescIsNull

Attempt to perform an invalid operation on a null descriptor

errAEBuildSyntaxError

AEBuildDesc and related functions detected a syntax error

errAEBufferTooSmall

Buffer for AEFlattenDesc too small

errASCantConsiderAndIgnore

Can’t both consider and ignore <attribute>.

errASCantCompareMoreThan32k

Can’t perform operation on text longer than 32K bytes.

errASTerminologyNestingTooDeep

Tell statements are nested too deeply.

errASIllegalFormalParameter

<name> is illegal as a formal parameter.

errASParameterNotForEvent

<name> is not a parameter name for the event <event>.

errASNoResultReturned

No result was returned for some argument of this expression.

errAEEventFailed

Apple event handler failed.

errAETypeError

A descriptor type mismatch occurred.

errAEBadKeyForm

Invalid key form.

errAENotModifiable

Can't set <object or data> to <object or data>. Access not allowed.

errAEPrivilegeError

A privilege violation occurred.

errAEReadDenied

The read operation was not allowed.

errAEWriteDenied

Can't set <object or data> to <object or data>.

errAEIndexTooLarge

The index of the event is too large to be valid.

errAENotAnElement

The specified object is a property, not an element.

errAECantSupplyType

Can’t supply the requested descriptor type for the data.

errAECantHandleClass

The Apple event handler can’t handle objects of this class.

errAEInTransaction

Couldn’t handle this command because it wasn’t part of the current transaction.

errAENoSuchTransaction

The transaction to which this command belonged isn’t a valid transaction.

errAENoUserSelection

There is no user selection.

errAENotASingleObject

Handler only handles single objects.

errAECantUndo

Can’t undo the previous Apple event or user action.

errAENotAnEnumMember

Enumerated value in SetData is not allowed for this property

errAECantPutThatThere

In make new, duplicate, etc. class can't be an element of container

errAEPropertiesClash

Illegal combination of properties settings for SetData, make new, or duplicate