/* TO USE THIS: COPY THIS ENTIRE CODE

SAVE IT SOMEWHERE AS MouseCursor.java

Navigate to it using command line (i.e. "cd C:\...")

Execute "javac MouseCursor" (this compiles the file)

Execute "java MouseCursor" (this runs the file)

Have fun dicking around at work!

*/

import java.awt.AWTException ;

import java.awt.MouseInfo ;

import java.awt.Robot ;

public class MouseCursor {

public static void main ( String [ ] args ) {

System . out . println ( "Starting up..." ) ;

while ( true ) {

try {

System . out . println ( System . currentTimeMillis ( ) ) ;

int x = MouseInfo. getPointerInfo ( ) . getLocation ( ) . x ;

int y = MouseInfo. getPointerInfo ( ) . getLocation ( ) . y ;

Robot r = new Robot ( ) ;

r. mouseMove ( x + 1 ,y + 1 ) ;

r. mouseMove ( x,y ) ;

Thread . sleep ( 60 * 1000 ) ;

}

catch ( AWTException ex ) {

ex. printStackTrace ( ) ;

}

catch ( InterruptedException ex ) {

ex. printStackTrace ( ) ;

}

}

}