Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Robot;
- import java.awt.event.InputEvent;
- import java.util.Random;
- public class out_of_control {
- public static void main(String[] args) throws Exception {
- Robot robot = new Robot();
- Random random = new Random();
- while(true){
- robot.mouseMove(random.nextInt(1200), random.nextInt(700));
- //click(robot); // don't un-comment, may cause harm.
- Thread.sleep(300);
- }
- }
- private static void click(Robot robot){
- robot.mousePress(InputEvent.BUTTON1_MASK);robot.mouseRelease(InputEvent.BUTTON1_MASK);
- robot.mousePress(InputEvent.BUTTON1_MASK);robot.mouseRelease(InputEvent.BUTTON1_MASK);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement