How to Trigger Keyboard Key for Illustrator dialog
Dear Friends,
We have try to handle Adobe Illustrator Image Link failed message button on file open process.
So We try to trigger the tab key .
//Press Tab key once
CGEventSourceRef source1 = CGEventSourceCreate(kCGEventSourceStateHIDSystemState);
CGEventRef event1 = CGEventCreateKeyboardEvent(NULL, (CGKeyCode)48, true);
CGEventSetFlags(event1, kCGEventFlagMaskCommand);
CGEventPost(kCGSessionEventTap, event1);
CFRelease(event1);
CGEventSourceRef source2 = CGEventSourceCreate(kCGEventSourceStateHIDSystemState);
CGEventRef event2 = CGEventCreateKeyboardEvent(NULL, (CGKeyCode)48, false);
CGEventSetFlags(event2, kCGEventFlagMaskCommand);
CGEventPost(kCGSessionEventTap, event2);
CFRelease(event2);
But the Following coding is not working for us.
If we have make any mistake on above coding and process please explain it.
Is there any other option to handle this button process please guide me for solve this problem.
With Regards,
Jayashree.J