I'm probably wrong, but I thought that:

dim a as new AXUIElementMBS

would do the trick, don't it?

If so, how to send a Keyboard event to the frontmost app?

Thanks

Jean-Luc Arnaud

Le 14/01/2015 11:57, Marnaud a écrit :
> Le 14 janv. 2015 à 11:26, Jean-Luc Arnaud <[email protected]> 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
> [email protected]
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>
>


_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to