Advertisement
Guest User

Untitled

a guest
Feb 24th, 2019
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. import java.awt.AWTException;
  2. import java.awt.MouseInfo;
  3. import java.awt.Robot;
  4. import java.awt.event.InputEvent;
  5.  
  6. public class clickr {
  7.  
  8. public static void main(String[] args) throws AWTException {
  9. //while (true)
  10. System.out.println(MouseInfo.getPointerInfo().getLocation());
  11.  
  12. Robot r = new Robot();
  13. r.mouseMove(-645, 445);
  14. r.mousePress(InputEvent.BUTTON1_DOWN_MASK);
  15. r.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
  16.  
  17. r.mouseMove(2650, 600);
  18. r.mousePress(InputEvent.BUTTON1_DOWN_MASK);
  19. r.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
  20. }
  21.  
  22. }
  23. //-645 445 for monitor 1
  24. //1000 500 for monitor 2
  25. //2650 600 for monitor 3
  26. //These are about the center of the monitor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement