Java Robot does not work in the game, does anyone know if there is a way?

0

Recently I made a bot for a game and had a problem that had happened to me before. The code runs out of the game but when I click on the game and press to start, only mousemove (robot class, java) works.

At the time, the resolution was just running the eclipse as an administrator and everything worked. Now I made it to another game and in that this technique does not work.

I've isolated this code to test:

import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.InputEvent;

public class Clique {

    public static void main(String[] args) 
    {
        Robot auto;
         try {
                auto=new Robot();
                System.out.println("delay");
                auto.delay(5000);
                auto.mousePress(InputEvent.BUTTON1_DOWN_MASK);
                auto.delay(100);
                auto.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
            } catch (AWTException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
    }

}

And even a simple click does not work (out of game works), does anyone know what might be happening?

NOTE: This is a PC game, a MMORPG more specifically.

    
asked by anonymous 01.02.2018 / 23:11

0 answers