Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. 1. from ctypes import windll, Structure, c_ulong, byref
  2. 2. import time
  3. 4.class POINT(Structure):
  4. 5. _fields_ = [("x", c_ulong), ("y", c_ulong)]
  5. 6.def queryMousePosition():
  6. 7. pt = POINT()
  7. 11. windll.user32.GetCursorPos(byref(pt))
  8. 12. return { "x": pt.x, "y": pt.y}
  9. 13.
  10. 14.while True:
  11. 15. pos = queryMousePosition()
  12. 16. if pos = ( x == 971 && y == 551) or
  13. (xpos == 960 && ypos == 540) or
  14. (xpos == 0 && ypos == 0) or
  15. (xpos == 11 && ypos == 11)
  16. 17. print trigger activated and print(pos) only once every minute even if mouse hits those
  17. coordinates above multiple times as this line will eventually run a command so it cannot que
  18. trigger activated from line 16
  19. 18. time.sleep(15)
  20.  
  21. 14.while True:
  22. 15. pos = queryMousePosition()
  23. 16. print(pos)
  24. 17. time.sleep(25)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement