enter keyboard commands to app

Asked by Dan on 2020-07-02

i'm running a roblox app on a windows pc, in the default window. I can enter keyboard single character commands (e.g. "s", "d", "e") in app normally (without sikuli), and app responds appropriately. I'm trying to get sikuli to simulate the keypresses. I've tried type("s"), and paste("s), with and without a preceding switchApp. mouse clicks on locations in the window work fine. but not the keyboard commands, which do not require a newline or return after them by the app . the keyboard commands are not associated with a text box for input. so there is no specific location other than the default screen. What am I dong wrong?

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2020-07-02
Last reply:
2020-07-15
RaiMan (raimund-hocke) said : #1

If at all, then type() should work.

... but it might be, that the key-simulation used by SikuliX (Java AWT Robot) is not accepted by your app, because it uses some layer nearer to the hardware, that directly watches out for keyboard actions.

In some cases it helps to run the stuff as admin, if type()/click() is blocked.

Can you help with this problem?

Provide an answer of your own, or ask Dan for more information if necessary.

To post a message you must log in.