AEGetNthDesc
You can use theAEGetNthDesc
function to get a copy of a descriptor record from any descriptor list.
FUNCTION AEGetNthDesc (theAEDescList: AEDescList; index: LongInt; desiredType: DescType; VAR theAEKeyword: AEKeyword; VAR result: AEDesc): OSErr;
theAEDescList
The descriptor list containing the desired descriptor record.index
- The position of the desired descriptor record in the list (for example, 2 specifies the second descriptor record).
desiredType
The desired descriptor type for the copy of the descriptor record to be returned; if the desired descriptor record is not of this type, the Apple Event Manager attempts to coerce it to this type. If the value ofdesiredType
istypeWildCard
, no coercion is performed, and the descriptor type of the copied descriptor record is the same as the descriptor type of the original descriptor record.theAEKeyword
- The keyword of the specified descriptor record, if you are getting data from a list of keyword-specified descriptor records; otherwise,
AEGetNthDesc
returns the valuetypeWildCard
.result
- A copy of the desired descriptor record coerced to the descriptor type specified by the
desiredType
parameter.DESCRIPTION
TheAEGetNthDesc
function returns a specified descriptor record from a specified descriptor list.Your application should call theAEDisposeDesc
function to dispose of the resulting descriptor record after your application has finished using it.If
AEGetNthDesc
returns a nonzero result code, it returns a descriptor record of descriptor typetypeNull
. A descriptor record of this type does not contain any data.RESULT CODES