In general, I'm just starting to learn Java and decided that in principle it can somehow be used. I want to try to write a small program that will automatically press Enter when a button appears in the game. Explain to a beginner is it possible to do such a thing in Java and where to start? Basic knowledge is already available, I would just send Thank you in advance!
|
2 answers
Perhaps, for example, using java.awt.Robot , he can:
- Take screenshots
- Manipulate mouse and keyboard
- ...
- Profit!
|
Can be done using the Robot class. For example, to press the Enter key:
Robot r = new Robot(); r.keyPress(KeyEvent.VK_ENTER); r.keyRelease(KeyEvent.VK_ENTER);
|