#1
|
|||
|
|||
manually set mouse cursor position
Hello,
I'm designing an experiment where the user picks an object with the mouse to initiate a trial. I'd like to reset the mouse cursor to the center of the screen before the start of a new trial, but I can't seem to find a way to set the position. Any help? |
#2
|
|||
|
|||
Here's some example code:
Code:
import viz import vizact import win32api viz.go() viz.addChild('piazza.osgb') def setCursorCenter(): win32api.SetCursorPos((400,300)) vizact.onkeydown(' ',setCursorCenter) |
#3
|
|||
|
|||
Many thanks Jeff!
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mouse bug in V3 and V4 | Renato Lima | Vizard | 2 | 05-11-2011 07:38 PM |
Mouse event: how to detect no mouse move event, how to set mouse position? | Zhi | Vizard | 3 | 04-11-2011 07:25 PM |
Warning mouse() -> Set mouse() of window | johannes2 | Vizard | 1 | 08-19-2010 03:11 PM |
how to remove velocity when mouse is disabled? | jvacare1 | Vizard | 2 | 02-18-2010 11:25 AM |
Navigating an avatar using mouse position(2D) in 3D environment | james007 | Vizard | 1 | 10-16-2009 12:29 PM |