SHARE
TWEET

Query Mouse Pointer Ctypes

a guest Apr 1st, 2016 596 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top