Skip to content

Instantly share code, notes, and snippets.

@tonidy
Last active October 8, 2015 09:18
Show Gist options
  • Save tonidy/3311652 to your computer and use it in GitHub Desktop.
Save tonidy/3311652 to your computer and use it in GitHub Desktop.
/**
* CobaRobot.java
* @author Enrico Budianto
* link enricobudianto.wordpress.com/2009/06/23/membuat-mouse-wiggle-sendiri-dengan-java
*/
import java.awt.Robot;
import java.awt.AWTException;
public class CobaRobot{
public static void main(String[] args) throws AWTException{
Robot rbt = new Robot();
try{
double a = 0;
double b = 0;
while(true){
a = (Math.random()*1000)%24000;
b = (Math.random()*1000)%24000;
rbt.mouseMove((int)a,(int)b);
rbt.delay(1000);
}
}
catch(Exception e){
e.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment