Scripting bridge: a way to directly send Apple Events to an SBApplication

Originator:amorya
Number:rdar://19396991 Date Originated:07-Jan-2015 10:37 AM
Status:Open Resolved:
Product:OS X SDK Product Version:Mac OS X 10.10.1 (14B25)
Classification:Enhancement Reproducible:Always
 
I would like to be able to send Apple Events directly to the target application. What that should entail is a way of easily building an Apple Event to send to the target process, and a way of sending it. I know I could build my own Apple Event then send it using AESendMessage, but that is not convenient to integrate with Scripting Bridge code. I suggest the following APIs on SBApplication:

- (NSAppleEventDescriptor*)appleEventTargetDescriptor; // returns an NSAppleEventDescriptor that can be used as the target descriptor for another event

- (BOOL)sendAppleEvent:(NSAppleEventDescriptor*)event sendMode:(AESendMode)sendMode timeout:(NSTimeInterval)timeout completion:(void (^)(NSAppleEventDescriptor* reply, NSError *error))completionBlock;

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!