Move mouse
in
Programming Questions
•
1 year ago
Hi
i'm trying to make my cursor move with processing code. So i'm not trying to get its coördinates or something else whatsoever, i just want to move the cursor itself.
I found this code on the forum (from 2008)
- int xx = 10, yy = 10;
- Robot robby;
- void setup()
- {
- size(500, 500);
- try
- {
- robby = new Robot();
- }
- catch (AWTException e)
- {
- println("Robot class not supported by your system!");
- exit();
- }
- }
- void draw()
- {
- xx = (xx + 2) % width;
- yy = (yy + 2) % height;
- // Might need to confine to sketch's window...
- robby.mouseMove(xx, yy);
- }
is there another way to make this work? or am i doing something wrong?
Thanks
Nick
1