Hi,
I’d like to ask for some tips for my first RPA Framework / Robocorp Lab robot.
During the holidays, I started working on a hobby project: the robot is supposed to play a simple realtime game on Windows 10 using keyboard controls. The game runs in a single window, which is pretty typical: it has a titlebar, menu and the game graphics surface. So, just a typical windows SDL game.
I’m able to launch the game (Open Using Run Dialog) and activate the window (Switch To Application), but nothing happens when the robot is supposed to press the ‘e’ key to start the game. I’ve tried all the usual keywords like Send Keys To Input, Send Keys and Press Keys, but nothing seems to work. A few key observations:
-If I let the robot launch and activate the game and then press the key manually, it works fine.
-If I launch and activate another application like calc.exe with the same method, the keypresses are registered just fine although they’re sent by the robot.
Without reading any of the RPA Framework source code yet, I’m wondering if the keypresses might not be sent on a sufficiently low level - perhaps the application expects to receive input events and those keywords just don’t work on that level? Is there some additional lib that is usually used for low-level keyboard emulation? Or am I missing some best practice recommendation about sending keys with RPA Framework?
Thanks and happy new year,
-Jukka