We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Moving the mouse pointer in Processing.
Page Index Toggle Pages: 1
Moving the mouse pointer in Processing. (Read 500 times)
Moving the mouse pointer in Processing.
Apr 23rd, 2009, 10:01am
 
Is it possible to change the position of the mouse pointer?

I want to always keep the mouse pointer at the middle of the screen. So everytime when the user move the cursor, it will calculate the direction then go right back to the center.
Re: Moving the mouse pointer in Processing.
Reply #1 - Apr 23rd, 2009, 10:24am
 
you could do that using noCursor(); to hide the os' cursor thereafter redrawing it on the position you want from inside processing [using a png image of a cursor, for example, to substitute the actual cursor].
Re: Moving the mouse pointer in Processing.
Reply #2 - Apr 23rd, 2009, 1:05pm
 
Check the Robot class of Java.
Of course, you are aware this can be a major usability issue... Smiley
Page Index Toggle Pages: 1