fubarable

Untitled

Mar 29th, 2015
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. import java.awt.AWTException;
  2. import java.awt.MouseInfo;
  3. import java.awt.Point;
  4. import java.awt.Robot;
  5.  
  6. public class Test {
  7.  
  8.    private static Point p;
  9.    private static Robot r;
  10.  
  11.    public static void main(String[] args) {
  12.       try {
  13.          r = new Robot();
  14.       } catch (AWTException e) {
  15.          e.printStackTrace();
  16.       }
  17.       while(true)
  18.       {
  19.           p=MouseInfo.getPointerInfo().getLocation();
  20.           System.out.println(p);
  21.           r.mouseMove(p.x,p.y);
  22.           r.delay(1000);
  23.       }
  24.    }
  25. }
Add Comment
Please, Sign In to add comment