Advertisement
Guest User

Query Mouse Pointer Ctypes

a guest
Apr 1st, 2016
2,299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. import ctypes
  2.  
  3. class POINT(ctypes.Structure):
  4.     _fields_ = [("x", ctypes.c_ulong), ("y", ctypes.c_ulong)]
  5.    
  6. point = POINT()
  7. ctypes.windll.user32.GetCursorPos(ctypes.pointer(point))
  8. print point.x, point.y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement