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