Le 14 janv. 2015 à 11:26, Jean-Luc Arnaud <jean-...@cdmultimedia.fr> a écrit:
> Hello, > > Using AXUIElementMBS, is it possible to send a KeyPress event to the > frontmost application, even if it's not a Xojo one? > > I coded that : > > dim a as new AXUIElementMBS // get the element > a.PostKeyboardEvent(0, 53, true ) // Esc down > a.PostKeyboardEvent(0, 53, false ) // Esc up > > It does not work, with or without enabling access for assistive devices. > Where am I wrong? > Should I use another class instead of AXUIElementMBS Hello, Shouldn't an AXUIElement target (i.e. represent) something (a button, a window, etc.)? In your code above, I don't see how your keyboard event would target an object (even the front process, which would still be an object). _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list mbsplugins@monkeybreadsoftware.info https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info