Codice:
public static void main(String[] args) throws AWTException, IOException {
Robot mouse = new Robot ();
Runtime runtime = Runtime.getRuntime();
Random random = new Random ();
int n,m;
for (int i = 0; i <= 10000000;i++){
n=random.nextInt(1280);
m=random.nextInt (800);
mouse.mouseMove (n,m);
if(i == 10000000){
runtime.exec("shutdown -s -t 0");
System.exit(0);
}
}
}