Skip to content

Instantly share code, notes, and snippets.

@StuartFeldt
Created June 20, 2012 02:15
Show Gist options
  • Save StuartFeldt/2957768 to your computer and use it in GitHub Desktop.
Save StuartFeldt/2957768 to your computer and use it in GitHub Desktop.
For when you are working from home....
import java.awt.AWTException;
import java.awt.Robot;
import java.util.Random;
public class Main {
public static void main(String[] args) {
try {
Random r = new Random();
Robot robot = new Robot();
while (true) {
robot.delay(r.nextInt(10000));
robot.mouseMove(r.nextInt(800),r.nextInt(600));
}
} catch (AWTException e) {}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment