Hi, I am creating a bot in java using java.atw.Robot. The bot works fine in the browser (I also tested it using Microsoft Word!), But when I run it in the game, the only function that works is mouseMove. I want to create a bot that just presses the keys for me.
I am creating an instance of a robot class
Robot r = new Robot();
Then I do a few simple things: press z, press 1, move the mouse and right-click.
r.keyPress(KeyEvent.VK_Z); r.keyRelease(KeyEvent.VK_Z); r.keyPress(KeyEvent.VK_1); System.out.println("Press 1 button"); r.keyRelease(KeyEvent.VK_1); System.out.println("Release 1 button"); r.delay(1000); System.out.println("Move mouse"); r.mouseMove(110, 690); System.out.println("Press"); r.mousePress(InputEvent.BUTTON3_MASK); System.out.println("Release"); r.mouseRelease(InputEvent.BUTTON3_MASK);
Why is this happening? Can this Robot class perform such actions in a game if it runs in the background?
thanks
Update . If I launch my bot at PES 2012, for example, it works fine, but if I run it in an online game such as Cabal, it will not work? the gameโs protection system does not detect anything, so itโs not.
source share