SBApplication : how to send raw data
-
26-09-2019 - |
Question
I woudl like to send raw data (a void*) using SBApplication sendEvent
Unfortunaltly I've found no documentation about this.
Do you have any idea to achieve this?
Thanks in advance for yoru help,
Regards,
Solution
sendEvent:id:parameters:
is actually a message that all SBObjects respond to, not just SBApplications. SBObject.h says:
// Send an Apple event. The direct parameter is the specifier of the receiver if it // is non-null. Other parameters are given using "parameters:" as a list of pairs // of the parameter four-byte code followed by an Objective-C object; use a parameter // code of 0 to mark the end of the list.
So, try boxing the data up into an NSData object, and passing that.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow