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.
- macOS 10.0+
- Core Services
A pointer to the descriptor list to get the descriptor from. See
A one-based positive integer indicating the position of the descriptor to get.
AEGetreturns an error if you pass zero, a negative number, or a value that is out of range.
The desired descriptor type for the descriptor to copy. For a list of AppleScript’s predefined descriptor types, see Descriptor Type Constants.
If the descriptor specified by the
indexparameter is not of the desired type,
AEGetattempts to coerce it to this type. However, if you pass a value of
type, no coercion is performed, and the descriptor type of the copied descriptor is the same as the descriptor type of the original descriptor.
A pointer to a keyword. On successful return, the keyword for the specified descriptor, if you are getting data from a list of keyword-specified descriptors; otherwise,
AEGetreturns the value
type. Some keyword constants are described in Keyword Attribute Constants and Keyword Parameter Constants. See
A pointer to a descriptor. On successful return, a copy of the descriptor specified by the
indexparameter, coerced, if necessary, to the descriptor type specified by the
desiredparameter. On error, a null descriptor. If the function returns successfully, your application should call the
AEDisposefunction to dispose of the resulting descriptor after it has finished using it. See
A result code. See Result Codes.
If the Nth descriptor in the list is itself an Apple event record and the desired type is not wildcard, record, or list,
AEGet will fail with an
err error. This behavior prevents coercion problems.
You may find the
AEGet function convenient for retrieving data for direct use in your application, as it includes automatic coercion.
Thread safe starting in OS X v10.2.