Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.AWTException;
- import java.awt.MouseInfo;
- import java.awt.Robot;
- import java.awt.event.InputEvent;
- public class clickr {
- public static void main(String[] args) throws AWTException {
- //while (true)
- System.out.println(MouseInfo.getPointerInfo().getLocation());
- Robot r = new Robot();
- r.mouseMove(-645, 445);
- r.mousePress(InputEvent.BUTTON1_DOWN_MASK);
- r.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
- r.mouseMove(2650, 600);
- r.mousePress(InputEvent.BUTTON1_DOWN_MASK);
- r.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
- }
- }
- //-645 445 for monitor 1
- //1000 500 for monitor 2
- //2650 600 for monitor 3
- //These are about the center of the monitor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement