Skip to main content
systems01h61704443
Known Participant
March 17, 2020
Question

How to Trigger Keyboard Key for Illustrator dialog

  • March 17, 2020
  • 0 replies
  • 321 views

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

This topic has been closed for replies.