/*!
@header NSAppleEventDescriptor+NDAppleScriptObject
@abstract Declares the category NSAppleEventDescriptor (NDAppleScriptObject)
@discussion Additional methods initially created for use with NDAppleScriptObject but could have other applications especially with Cocoa's NSAppleScript.
*/
#import Adds methods for converting between AppleEvent types and Objective-C types. The following type conversions are supported in 'either direction' or 'both directions';
Objective-C Type
Descriptor Type
nil
typeNull
NSNumber<BOOL>
typeBoolean
NSNumber<short int>
NSNumber<char>typeSInt16
typeShortInteger
typeSMInt
NSNumber<int>
NSNumber<long int>typeSInt32
typeLongInteger
typeInteger
NSNumber<float>
typeIEEE32BitFloatingPoint
typeShortFloat
typeSMFloat
NSNumber<double>
typeIEEE64BitFloatingPoint
typeFloat
typeLongFloat
NSNumber<long double>
type128BitFloatingPoint
NSNumber<unsigned char>
NSNumber<unsigned short int>
NSNumber<unsigned int>
NSNumber<unsigned long int>typeUInt32
NSNumber<unsigned long long>
NSNumber<long long>no 64 bit unsigned
typeSInt64
NSValue<NSRange>
typeOSAErrorRange
NSString
typeText
kTXNUnicodeTextData
typeAlias
see aliasListDescriptorWithArray: and aliasDescriptorWithString:
NSArray
typeAEList
typeAEList<typeAlias>
see aliasListDescriptorWithArray:
NSDictionary
typeAERecord
see descriptorWithDictionary:
typeAEList
see userRecordDescriptorWithDictionary:
NSURL
typeAlias
typeFileURL
NDAppleScriptObject
cScript
short int
typeShortInteger
int
typeInteger
unsigned int
typeMagnitude
long int
typeLongInteger
float
typeShortFloat
double
typeLongFloat
BOOL
typeBoolean
typeTrue
typeFalse
char*
typeText
id*
typeAEList
typeAERecord
va_list
typeAEList
typeAERecord
@param number The NSNumber. @result A NSAppleEventDescriptor containing a number. */ + (id)descriptorWithNumber:(NSNumber *)number; /*! @method descriptorWithValue: @abstract Returns a NSAppleEventDescriptor containing a value descriptor. @discussion Returns a NSAppleEventDescriptor containing a descriptor for the value contained within value. The value is determined by object-C type returned frome the method -[NSValue objCType] with the following mappings;
Objective-C Type Descriptor Type float typeIEEE32BitFloatingPoint double typeIEEE64BitFloatingPoint long double type128BitFloatingPoint unsigned char typeUInt32 char typeSInt16 unsigned short int typeUInt32 short int typeSInt16 unsigned int typeUInt32 int typeSInt32 unsigned long int typeUInt32 long int typeSInt32 unsigned long long typeSInt64 long long typeSInt64 BOOL typeBoolean
@param value The NSValue @result A NSAppleEventDescriptor containing a value. */ + (id)descriptorWithValue:(NSValue *)value; /*! @method descriptorWithObject: @abstract Returns a NSAppleEventDescriptor. @discussion
Objective-C Type Descriptor Type NSRange typeRangeDescriptor
descriptorWithObject: will return the best descriptor for the given the object using one of the other -[NSAppleEventDescriptor descriptorWithXXXX:] methods. descriptorWithObject: works recursivly so if object is of type NSArray or NSDictionary then the objects contained within object will also be converted to descriptors using the this method.
The following type classes are supported;
@param object An object that can be converted into a descriptor. @result A NSAppleEventDescriptor. */ + (id)descriptorWithObject:(id)object; /*! @method descriptorWithArray: @abstract Returns a list descriptor. @discussion descriptorWithArray: returns a list decriptor containing AppleEvent decriptors returned from the method descriptorWithObject: when passed each of array's objects. @param array The array to create a NSAppleEventDescriptor from. @result A NSAppleEventDescriptor for a list descriptor. */ + (id)descriptorWithArray:(NSArray *)array; /*! @method listDescriptorWithObjects:... @abstract Returns a list descriptor. @discussion descriptorWithArray: returns a list decriptor containing AppleEvent decriptors returned from the method descriptorWithObject: when passed each of object arguments. @param firstObject The argument list terminated with nil. @result A NSAppleEventDescriptor for a list descriptor. */ + (id)listDescriptorWithObjects:(id)firstObject, ...; /*! @method listDescriptorWithObjects:arguments: @abstract Returns a list descriptor. @discussion descriptorWithArray: returns a list decriptor containing AppleEvent decriptors returned from the method descriptorWithObject: when passed each of object arguments. @param firstObject The first object of the argument list. @param argList The argument list. @result A NSAppleEventDescriptor for a list descriptor. */ + (id)listDescriptorWithObjects:(id)object arguments:(va_list)argList; /*! @method recordDescriptorWithObjects:keywords:count: @abstract Returns a record descriptor @discussion Returns a record descriptor with the supplied object and keys. The objects are converted into NSAppleEventDescriptor with the method descriptorWithObject:. @param objects A pointer to an array of objects. @param keywords A pointer to an array of keywords @param count The number of objects and keywords. @result A NSAppleEventDescriptor for a record descriptor. */ + (NSAppleEventDescriptor *)recordDescriptorWithObjects:(id *)objects keywords:(AEKeyword *)keywords count:(unsigned int)count; /*! @method recordDescriptorWithDictionary: @abstract Returns a record descriptor @discussion The dictionary keys must be NSNumber, preferable NSNumber<unsigned long int>, representing AEKeyword. The values are converted to NSAppleEventDescriptor's with the method descriptorWithObject:. If you are after a record as typically used in apple scripts then see the method descriptorWithDictionary: @param dictionary A dictionary where the keys are all NSNumber<unsigned long int> @result A NSAppleEventDescriptor for a record descriptor. */ + (NSAppleEventDescriptor *)recordDescriptorWithDictionary:(NSDictionary *)dictionary; /*! @method descriptorWithDictionary: @abstract Returns a record descriptor @discussion Returns a record descriptor with one key value pair where the keyword is keyASUserRecordFields and the value is descriptor of the type typeAEList as returned from the method userRecordDescriptorWithDictionary:. This is how record types in AppleScript are represented using AppleEvents @param aDictionary A dictionary where the key can be represented as case insensitive strings. @result A NSAppleEventDescriptor for a record descriptor. */ + (id)descriptorWithDictionary:(NSDictionary *)aDictionary; /*! @method descriptorWithObjectAndKeys:... @abstract Returns a record descriptor @discussion Returns a record descriptor with one key value pair where the keyword is keyASUserRecordFields and the value is descriptor of the type typeAEList as returned from the method userRecordDescriptorWithObjectAndKeys:arguments:. This is how record types in AppleScript are represented using AppleEvents @param object The first object is a list of object/key pairs terminated with nil. @result A NSAppleEventDescriptor for a record descriptor. */ + (id)descriptorWithObjectAndKeys:(id)object, ...; /*! @method descriptorWithObjectAndKeys:arguments: @abstract Returns a record descriptor @discussion Returns a record descriptor with one key value pair where the keyword is keyASUserRecordFields and the value is descriptor of the type typeAEList as returned from the method userRecordDescriptorWithObjectAndKeys:arguments:. This is how record types in AppleScript are represented using AppleEvents @param object The first object is a list of object/key pairs. @param argList The argument list. @result A NSAppleEventDescriptor for a record descriptor. */ + (id)descriptorWithObjectAndKeys:(id)object arguments:(va_list)argList; /*! @method userRecordDescriptorWithObjectAndKeys:... @abstract Returns a user record. @discussion Create a list descriptor that can be used as the value for the key keyASUserRecordFields in record descriptors of AppleEvents representing AppleScript subroutine calls, this is how records in AppleScripts represented. The resulting descriptor is identical to the descriptor returned from the method listDescriptorWithObjects:... if the keys and object are swap around and all of the keys are of type NSString. userRecordDescriptorWithObjectAndKeys:... has the advantage over listDescriptorWithObjects:... in that the keys are converted to NSString using the method -[NSObject description]. @param object A list of object and keys terminated with a nil. @result A NSAppleEventDescriptor for a list descriptor representing a user record. */ + (id)userRecordDescriptorWithObjectAndKeys:(id)object, ...; /*! @method userRecordDescriptorWithObjectAndKeys:arguments: @abstract Returns a user record. @discussion Create a list descriptor that can be used as the value for the key keyASUserRecordFields in record descriptors of AppleEvents representing AppleScript subroutine calls, this is how records in AppleScripts represented. The objects are converted to NSAppleEventDescriptor using the method descriptorWithObject:. @param object The first object in a list of objects and keys. @param argList The arguments list. @result A NSAppleEventDescriptor for a list descriptor representing a user record. */ + (NSAppleEventDescriptor *)userRecordDescriptorWithObjectAndKeys:(id)object arguments:(va_list)argList; /*! @method userRecordDescriptorWithObjects:keys:count: @abstract Returns a user record. @discussion Create a list descriptor that can be used as the value for the key keyASUserRecordFields in record descriptors of AppleEvents representing AppleScript subroutine calls, this is how records in AppleScripts represented. The objects are converted to NSAppleEventDescriptor using the method descriptorWithObject:. @param objects A pointer to an array of objects. @param keys A pointer to an array of NSStrings representing keys. @param count The number of objects and keys. @result A NSAppleEventDescriptor for a list descriptor representing a user record. */ + (NSAppleEventDescriptor *)userRecordDescriptorWithObjects:(id *)objects keys:(NSString **)keys count:(unsigned int)count; /*! @method userRecordDescriptorWithDictionary: @abstract Returns a user record descriptor. @discussion Create a list descriptor that can be used as the value for the key keyASUserRecordFields in record descriptors of AppleEvents representing AppleScript subroutine calls, this is how records in AppleScripts represented. The objects are converted to NSAppleEventDescriptor using the method descriptorWithObject:. @param dictionary A dictionay where the keys are all NSStrings @result A NSAppleEventDescriptor for a list descriptor representing a user record. */ + (NSAppleEventDescriptor *)userRecordDescriptorWithDictionary:(NSDictionary *)dictionary; /*! @method arrayValue @abstract Returns an NSArray for a list descriptor. @discussion Returns a NSArray if the receviers contains list descriptor with each element convert to an appropriate object as determined by the method -[NSAppleEventDescriptor objectValue]. If the recevier does not contain a list descriptor then an NSArray filled with garbage is returned. @result A NSArray. */ - (NSArray *)arrayValue; /*! @method dictionaryValueFromRecordDescriptor @abstract Returns an NSDictionary for a record descriptor. @discussion Returns a NSDictionary if the receviers is a record descriptor with each element convert to an appropriate object as determined by the method -[NSAppleEventDescriptor objectValue] and the key converted to a NSNumbers. If the recevier does not contain a record descriptor then the resut is undefined. @result A NSDictionary. */ - (NSDictionary *)dictionaryValueFromRecordDescriptor; /*! @method dictionaryValue @abstract Returns an NSDictionary for a record descriptor. @discussion Returns a NSDictionary if the receviers is a record descriptor with a list value for the key keyASUserRecordFields, this is how records from AppleScripts are represented. Each even numbered element of the list is converted in to an appropriate object as determined by the method -[NSAppleEventDescriptor objectValue] and each odd numbered element is used as the key and converted to a NSString. If the recevier is not a record descriptor that contains a list value for the key keyASUserRecordFields then the resut is undefined. @result A NSDictionary with keys all of type NSString */ - (NSDictionary *)dictionaryValue; /*! @method urlValue @abstract Returns a NSURL for the recevier.. @discussion Returns a file url NSURL for an alias descriptor. If the recevier does not contain an alias descriptor the nil is returned. Currently url descriptors are not handled. @result A NSURL. */ - (NSURL *)urlValue; /*! @method unsignedIntValue @abstract Returns a unsigned int value for the recevier. @discussion Returns a unsigned int value if the recevier contains a unsigned integer descriptor, otherwise it returns 0. @result An unsigned int value. */ - (unsigned int)unsignedIntValue; /*! @method floatValue @abstract Returns a float value for the recevier. @discussion Returns a float value if the recevier contains a float descriptor, otherwise it returns 0. @result An float value. */ - (float)floatValue; /*! @method doubleValue @abstract Returns a double value for the recevier. @discussion Returns a double value if the recevier contains a double descriptor, otherwise it returns 0. @result An double value. */ - (double)doubleValue; /*! @method value @abstract Returns a NSValue object for the recevier. @discussion Returns a NSValue object for the recevier if it contains a any value or number type descriptor, otherwise it returns nil. For most values value is identical to numberValue. @result An NSValue object. */ - (NSValue *)value; /*! @method numberValue @abstract Returns a NSNumber object for the recevier. @discussion Returns a NSNumber object for the recevier if it contains a any number type descriptor, otherwise it returns nil. @result An NSNumber object. */ - (NSNumber *)numberValue; /*! @method objectValue @abstract Returns a object for the recevier. @discussion
Objective-C Class Descriptor Type nil typeNull NSNumber<BOOL> typeBoolean NSNumber<short int>
NSNumber<char>typeSInt16
typeShortInteger
typeSMIntNSNumber<int>
NSNumber<long int>typeSInt32
typeLongInteger
typeIntegerNSNumber<float> typeIEEE32BitFloatingPoint
typeShortFloat
typeSMFloatNSNumber<double> typeIEEE64BitFloatingPoint
typeFloat
typeLongFloatNSNumber<long double> type128BitFloatingPoint NSNumber<unsigned char>
NSNumber<unsigned short int>
NSNumber<unsigned int>
NSNumber<unsigned long int>typeUInt32 NSNumber<unsigned long long>
NSNumber<long long>no 64 bit unsigned
typeSInt64NSValue<NSRange> typeOSAErrorRange NSString typeText
kTXNUnicodeTextDataNSArray typeAEList NSDictionary typeAERecord NSURL typeAlias NSAppleEventDescriptor [object typeCodeValue]
returns object unmodifiedNDAppleScriptObject cScript
Returns a subclass of NSObject by determining the type of the receviers descriptor and converting it into the appropriate instance of a Objective-C class.
Descriptor types are mapped to classes in the following ways.
@result A subclass of NSObject */ - (id)objectValue; @end /*! @category NSAppleEventDescriptor(NDCompleteEvents) @abstract Category of NSAppleEventDescriptor. @discussion Adds methods for creating complete AppleEvents. */ @interface NSAppleEventDescriptor (NDCompleteEvents) /*! @method openEventDescriptorWithTargetDescriptor: @abstract Get a NSAppleEventDescriptor for an open event. @discussion Creates a NSAppleEventDescriptor for an open application event, kAEOpenApplication. @param targetDescriptor an NSAppleEventDescriptor that identifies the target application for the Apple event. @result A NSAppleEventDescriptor containing an open application event descriptor. */ + (NSAppleEventDescriptor *)openEventDescriptorWithTargetDescriptor:(NSAppleEventDescriptor *)targetDescriptor; /*! @method openEventDescriptorWithTargetDescriptor:array: @abstract Get a NSAppleEventDescriptor for an open event. @discussion Creates a NSAppleEventDescriptor for an open document event, kAEOpenDocuments. The objects within array have to be NSString paths or file NSULRs, which are converted into typeAlias. @param targetDescriptor an NSAppleEventDescriptor that identifies the target application for the Apple event. @param array A NSArray of file url NSURLs and/or path NSStrings. @result A NSAppleEventDescriptor containing an open application event or an open documents event descriptor. */ + (NSAppleEventDescriptor *)openEventDescriptorWithTargetDescriptor:(NSAppleEventDescriptor *)targetDescriptor array:(NSArray *)array; /*! @method quitEventDescriptorWithTargetDescriptor: @abstract Get a NSAppleEventDescriptor for a quit event. @discussion Creates a NSAppleEventDescriptor for an quit event, kAEQuitApplication. @param targetDescriptor an NSAppleEventDescriptor that identifies the target application for the Apple event. @result A NSAppleEventDescriptor containing a quit event descriptor. */ + (NSAppleEventDescriptor *)quitEventDescriptorWithTargetDescriptor:(NSAppleEventDescriptor *)targetDescriptor; /*! @method descriptorWithSubroutineName:argumentsListDescriptor: @abstract Returns a NSAppleEventDescriptor for calling AppleScript routines. @discussion AppleScript routines can be called by name, descriptorWithSubroutineName:argumentsDescriptor: returns a NSAppleEventDescriptor to do so. The routineName is the name of the routine to be called, AppleScript routines are case insensitive, routineName is converted to all lower case. @param routineName The rountine name to be called. @param param The parameters descriptors. @result A NSAppleEventDescriptor */ + (id)descriptorWithSubroutineName:(NSString *)routineName argumentsListDescriptor:(NSAppleEventDescriptor *)param; /*! @method descriptorWithSubroutineName:argumentsArray: @abstract Returns a NSAppleEventDescriptor for calling an AppleScript subroutine with positional arguments. @discussion descriptorWithSubroutineName:argumentsDescriptor: returns a NSAppleEventDescriptor to call a AppleScript subroutine with positional arguments. AppleScript routines are case insensitive so routineName is converted to all lower case. @param routineName The rountine name to be called. @param paramArray A NSArray of Objective-C class that are converted into NSAppleEventDescriptor using the function descriptorWithObject:. @result A NSAppleEventDescriptor for a subroutine with positional arguments. */ + (id)descriptorWithSubroutineName:(NSString *)routineName argumentsArray:(NSArray *)paramArray; /*! @method descriptorWithSubroutineName:arguments:... @abstract Returns a NSAppleEventDescriptor for calling an AppleScript subroutine with positional arguments. @discussion descriptorWithSubroutineName:arguments: returns a NSAppleEventDescriptor to call a AppleScript subroutine with positional arguments. AppleScript routines are case insensitive so routineName is converted to all lower case. @param routineName The rountine name to be called. @param firstArg The first object of a nil terminated list of objects that are converted into NSAppleEventDescriptor using the function descriptorWithObject:. @result A NSAppleEventDescriptor for a subroutine with positional arguments. */ + (id)descriptorWithSubroutineName:(NSString *)routineName arguments:(id)firstArg, ...; /*! @method descriptorWithSubroutineName:labels:argumentObjects:count: @abstract Returns a NSAppleEventDescriptor for calling an AppleScript routine with labeled arguments. @discussion
Descriptor Type Objective-C Class typeNull NSNull typeBoolean
typeShortInteger
typeSMInt
typeLongInteger
typeInteger
typeIEEE32BitFloatingPoint
typeShortFloat
typeSMFloat
typeIEEE64BitFloatingPoint
typeFloat
typeLongFloat
typeExtended
typeComp
typeMagnitude
typeTrue
typeFalseNSNumber typeChar NSString typeAEList NSArray typeAERecord NSDictionary typeAlias
typeFileURLNSULR cScript NDAppleScriptObject if available.
NSAppleEventDescriptor otherwise.cEventIdentifier NSNumber All Other Types NSAppleEventDescriptor
descriptorWithSubroutineName:argumentsDescriptor: returns a NSAppleEventDescriptor to call a AppleScript subroutine with labeled arguments. AppleScript routines are case insensitive so routineName is converted to all lower case. paramArray is an array of objective-C types that are converted into NSAppleEventDescriptor using the function descriptorWithObject:.
The possible keywords are;
Key Word AppleScript key word keyASPrepositionAbout about keyASPrepositionAbove above keyASPrepositionAgainst against keyASPrepositionApartFrom apart from keyASPrepositionAround around keyASPrepositionAsideFrom aside from keyASPrepositionAt at keyASPrepositionBelow below keyASPrepositionBeneath beneath keyASPrepositionBeside beside keyASPrepositionBetween between keyASPrepositionBy by keyASPrepositionFor for keyASPrepositionFrom from keyASPrepositionGiven given keyASPrepositionIn in keyASPrepositionInsteadOf instead of keyASPrepositionInto into keyASPrepositionOn on keyASPrepositionOnto onto keyASPrepositionOutOf out of keyASPrepositionOver over keyASPrepositionSince since keyASPrepositionThrough through keyASPrepositionThru thru keyASPrepositionTo to keyASPrepositionUnder under keyASPrepositionUntil until keyASPrepositionWith with keyASPrepositionWithout without keyASUserRecordFields key for a list descriptor of user record fields
To find out the rules for use of the key words see the AppleScript language documentation.
@param routineName The rountine name to be called. @param labels A c array of keywords @param objects A c array of Objective-C class that are converted into NSAppleEventDescriptor using the function descriptorWithObject:. @param count The number of labels and objects @result A NSAppleEventDescriptor for a subroutine with labled arguments. */ + (id)descriptorWithSubroutineName:(NSString *)routineName labels:(AEKeyword*)labels argumentObjects:(id *)objects count:(unsigned int)count; /*! @method descriptorWithSubroutineName:labels:argumentDescriptors:count: @abstract Returns a NSAppleEventDescriptor for calling an AppleScript routine with labeled arguments. @discussiondescriptorWithSubroutineName:labels:argumentDescriptors:count: returns a NSAppleEventDescriptor to call a AppleScript subroutine with labeled arguments. AppleScript routines are case insensitive so routineName is converted to all lower case. If keyASUserRecordFields is used as a keyword then the NSAppleEventDescriptor should be a list descriptor alternating between keys and parameter begining with a key, as returned from one of the userRecordDescriptorWith... methods.
The possible keywords are;
To find out the rules for use of the key words see the AppleScript language documentation. @param routineName The rountine name to be called. @param labels A c array of keyword labels. @param params A c array of NSAppleEventDescriptor for the parameters. @param count The number of keywords and parameters. @result A NSAppleEventDescriptor for a subroutine with labled arguments. */ + (id)descriptorWithSubroutineName:(NSString *)routineName labels:(AEKeyword*)labels argumentDescriptors:(NSAppleEventDescriptor **)params count:(unsigned int)count; /*! @method descriptorWithSubroutineName:labelsAndArguments:... @abstract Returns a NSAppleEventDescriptor for calling an AppleScript routine with labeled arguments. @discussion
Key Word AppleScript key word keyASPrepositionAbout about keyASPrepositionAbove above keyASPrepositionAgainst against keyASPrepositionApartFrom apart from keyASPrepositionAround around keyASPrepositionAsideFrom aside from keyASPrepositionAt at keyASPrepositionBelow below keyASPrepositionBeneath beneath keyASPrepositionBeside beside keyASPrepositionBetween between keyASPrepositionBy by keyASPrepositionFor for keyASPrepositionFrom from keyASPrepositionGiven given keyASPrepositionIn in keyASPrepositionInsteadOf instead of keyASPrepositionInto into keyASPrepositionOn on keyASPrepositionOnto onto keyASPrepositionOutOf out of keyASPrepositionOver over keyASPrepositionSince since keyASPrepositionThrough through keyASPrepositionThru thru keyASPrepositionTo to keyASPrepositionUnder under keyASPrepositionUntil until keyASPrepositionWith with keyASPrepositionWithout without keyASUserRecordFields key for a list descriptor of user record fields
descriptorWithSubroutineName:labelsAndArguments:... returns a NSAppleEventDescriptor to call a AppleScript subroutine with labeled arguments. AppleScript routines are case insensitive so routineName is converted to all lower case. If keyASPrepositionGiven is used as a keyword then the arguments following it are passed to the method userRecordDescriptorWithObjectAndKeys:. and resulting descriptor is given the key keyASUserRecordFields
For example to get a subroutine descriptor to call the AppleScript subroutine
you would do the followingfoo for arg1 given argument:arg2
which is equivalent totheSubroutine = [NSAppleEventDescriptor descriptorWithSubroutineName:@"foo" labelsAndArguments:keyASPrepositionFor, arg1, keyASPrepositionGiven, arg2, @"argument", nil];
theSubroutine = [NSAppleEventDescriptor descriptorWithSubroutineName:@"foo" labelsAndArguments:keyASPrepositionFor, arg1, keyASUserRecordFields, [NSAppleEventDescriptor userRecordDescriptorWithObjectAndKeys:arg2, @"argument", nil], (AEKeyword)0];
The possible keywords are;
Key Word AppleScript key word keyASPrepositionAbout about keyASPrepositionAbove above keyASPrepositionAgainst against keyASPrepositionApartFrom apart from keyASPrepositionAround around keyASPrepositionAsideFrom aside from keyASPrepositionAt at keyASPrepositionBelow below keyASPrepositionBeneath beneath keyASPrepositionBeside beside keyASPrepositionBetween between keyASPrepositionBy by keyASPrepositionFor for keyASPrepositionFrom from keyASPrepositionGiven given keyASPrepositionIn in keyASPrepositionInsteadOf instead of keyASPrepositionInto into keyASPrepositionOn on keyASPrepositionOnto onto keyASPrepositionOutOf out of keyASPrepositionOver over keyASPrepositionSince since keyASPrepositionThrough through keyASPrepositionThru thru keyASPrepositionTo to keyASPrepositionUnder under keyASPrepositionUntil until keyASPrepositionWith with keyASPrepositionWithout without keyASUserRecordFields key for a list descriptor of user record fields
To find out the rules for use of the key words see the AppleScript language documentation.
@param routineName The subroutine name. @param keyWord The first label of a list of labels and objects terminated with a 0 keyword or a nil if the end arguments follow the keyword keyASPrepositionGiven @result A NSAppleEventDescriptor for a subroutine with labled arguments. */ + (id)descriptorWithSubroutineName:(NSString *)routineName labelsAndArguments:(AEKeyword)keyWord, ...; /*! @method initWithSubroutineName:argumentsDescriptor: @abstract Initialises a NSAppleEventDescriptor for calling AppleScript routines. @discussion AppleScript routines can be called by name, initWithSubroutineName:argumentsDescriptor: returns a NSAppleEventDescriptor to do so. The routineName is the name of the routine to be called, AppleScript routines are case insensitive, routineName is converted to all lower case. @param routineName The rountine name to be called. @param param The parameters descriptors. @result A NSAppleEventDescriptor for a subroutine with positional arguments. */ - (id)initWithSubroutineName:(NSString *)routineName argumentsListDescriptor:(NSAppleEventDescriptor *)param; /*! @method initWithSubroutineName:argumentsArray: @abstract Initialises a NSAppleEventDescriptor for calling AppleScript routines. @discussion AppleScript routines can be called by name, initWithSubroutineName:argumentsDescriptor: returns a NSAppleEventDescriptor to do so. The routineName is the name of the routine to be called, AppleScript routines are case insensitive, routineName is converted to all lower case. paramArray is an array of objective-C types that can be converted into AppleScript types. @param routineName The rountine name to be called. @param paramArray The parameters. @result A NSAppleEventDescriptor for a subroutine with positional arguments. */ - (id)initWithSubroutineName:(NSString *)routineName argumentsArray:(NSArray *)paramArray; /*! @method initWithSubroutineName:labels:argumentDescriptors:count: @abstract Returns a NSAppleEventDescriptor for calling an AppleScript routine with labeled arguments. @discussioninitWithSubroutineName:labels:argumentDescriptors:count: inirializes a NSAppleEventDescriptor with a AppleScript subroutine descriptors with labeled arguments. The keyword label keyASUserRecordFields must be for a list descriptor similar to that returned from the one of the userRecordDescriptorWithXXX: methods.
The possible keywords are;
Key Word AppleScript key word keyASPrepositionAbout about keyASPrepositionAbove above keyASPrepositionAgainst against keyASPrepositionApartFrom apart from keyASPrepositionAround around keyASPrepositionAsideFrom aside from keyASPrepositionAt at keyASPrepositionBelow below keyASPrepositionBeneath beneath keyASPrepositionBeside beside keyASPrepositionBetween between keyASPrepositionBy by keyASPrepositionFor for keyASPrepositionFrom from keyASPrepositionGiven given keyASPrepositionIn in keyASPrepositionInsteadOf instead of keyASPrepositionInto into keyASPrepositionOn on keyASPrepositionOnto onto keyASPrepositionOutOf out of keyASPrepositionOver over keyASPrepositionSince since keyASPrepositionThrough through keyASPrepositionThru thru keyASPrepositionTo to keyASPrepositionUnder under keyASPrepositionUntil until keyASPrepositionWith with keyASPrepositionWithout without keyASUserRecordFields key for a list descriptor of user record fields
To find out the rules for use of the key words see the AppleScript language documentation.
@param routineName The rountine name to be called. @param labels A c array of AEKeywords. @param param A c array of NSAppleEventDescriptors @param count The number of keywords and NSAppleEventDescriptors @result A NSAppleEventDescriptor for a subroutine with labeled arguments. */ - (id)initWithSubroutineName:(NSString *)routineName labels:(AEKeyword*)labels argumentDescriptors:(NSAppleEventDescriptor **)aParam count:(unsigned int)count; /*! @method initWithSubroutineName:labels:arguments:count: @abstract Returns a NSAppleEventDescriptor for calling an AppleScript routine with labeled arguments. @discussioninitWithSubroutineName:labels:arguments:count: initializes a NSAppleEventDescriptor with a AppleScript subroutine descriptor with labeled arguments. If the the keyword keyASPrepositionGiven is used it should be the last label and have a argument of kind NSDictionary or NSAppleEventDescriptor as return from one of the userRecordDescriptorWithXXXX:.
The possible keywords are;
Key Word AppleScript key word keyASPrepositionAbout about keyASPrepositionAbove above keyASPrepositionAgainst against keyASPrepositionApartFrom apart from keyASPrepositionAround around keyASPrepositionAsideFrom aside from keyASPrepositionAt at keyASPrepositionBelow below keyASPrepositionBeneath beneath keyASPrepositionBeside beside keyASPrepositionBetween between keyASPrepositionBy by keyASPrepositionFor for keyASPrepositionFrom from keyASPrepositionGiven given keyASPrepositionIn in keyASPrepositionInsteadOf instead of keyASPrepositionInto into keyASPrepositionOn on keyASPrepositionOnto onto keyASPrepositionOutOf out of keyASPrepositionOver over keyASPrepositionSince since keyASPrepositionThrough through keyASPrepositionThru thru keyASPrepositionTo to keyASPrepositionUnder under keyASPrepositionUntil until keyASPrepositionWith with keyASPrepositionWithout without keyASUserRecordFields key for a list descriptor of user record fields
To find out the rules for use of the key words see the AppleScript language documentation.
@param routineName The rountine name to be called. @param labels A c array of keywords @param objects A c array of objects that can be converted to NSAppleEventDescriptor with the method descriptorWithObject: @param count The number of keywords and objects. @result A NSAppleEventDescriptor for a subroutine with labeled arguments. */ - (id)initWithSubroutineName:(NSString *)routineName labels:(AEKeyword*)labels arguments:(id *)objects count:(unsigned int)count; /*! @method initWithSubroutineName:labelsAndArguments:arguments: @abstract Returns a NSAppleEventDescriptor for calling an AppleScript routine with labeled arguments. @discussioninitWithSubroutineName:labelsAndArguments:arguments: initializes a NSAppleEventDescriptor with an AppleScript subroutine with labeled arguments, if the keyword keyASPrepositionGiven is found the remaining arguments will be passed to the method userRecordDescriptorWithObjectAndKeys:arguments: and the result is given the keyword keyASUserRecordFields.
The possible keywords are;
Key Word AppleScript key word keyASPrepositionAbout about keyASPrepositionAbove above keyASPrepositionAgainst against keyASPrepositionApartFrom apart from keyASPrepositionAround around keyASPrepositionAsideFrom aside from keyASPrepositionAt at keyASPrepositionBelow below keyASPrepositionBeneath beneath keyASPrepositionBeside beside keyASPrepositionBetween between keyASPrepositionBy by keyASPrepositionFor for keyASPrepositionFrom from keyASPrepositionGiven given keyASPrepositionIn in keyASPrepositionInsteadOf instead of keyASPrepositionInto into keyASPrepositionOn on keyASPrepositionOnto onto keyASPrepositionOutOf out of keyASPrepositionOver over keyASPrepositionSince since keyASPrepositionThrough through keyASPrepositionThru thru keyASPrepositionTo to keyASPrepositionUnder under keyASPrepositionUntil until keyASPrepositionWith with keyASPrepositionWithout without keyASUserRecordFields key for a list descriptor of user record fields
To find out the rules for use of the key words see the AppleScript language documentation.
See descriptorWithSubroutineName:labelsAndArguments:... for more details
@param routineName The rountine name to be called. @param label The first keyword of a list of labels and objects. @param argList The argument list struct. @result A NSAppleEventDescriptor for a subroutine with labeled arguments. */ - (id)initWithSubroutineName:(NSString *)routineName labelsAndArguments:(AEKeyword)label arguments:(va_list)argList; @end