Is it possible to get the overall cursor position in Windows using the standard Python libraries?
Advertisement
Answer
JavaScript
x
2
1
win32gui.GetCursorPos(point)
2
This retrieves the cursor’s position, in screen coordinates – point = (x,y)
JavaScript
1
2
1
flags, hcursor, (x,y) = win32gui.GetCursorInfo()
2
Retrieves information about the global cursor.
Links:
- http://msdn.microsoft.com/en-us/library/ms648389(VS.85).aspx
- http://msdn.microsoft.com/en-us/library/ms648390(VS.85).aspx
I am assuming that you would be using python win32 API bindings or pywin32.