Advertisement
Guest User

Untitled

a guest
May 26th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. from pynput.mouse import Listener
  2. import logging
  3. import os
  4. import pyautogui
  5.  
  6. screenSize = pyautogui.size()
  7. comboName = str(input("What is the name of your combo? "))
  8. logging.basicConfig(filename=(comboName+".txt"), level=logging.DEBUG)
  9.  
  10. def on_move(x, y):
  11. if x == screenSize[0] and y == screenSize[1]:
  12. os._exit(0)
  13. def on_click(x, y, button, pressed):
  14. if pressed:
  15. if str(button) == "button.left":
  16. logging.info(str(x) + " " + str(y) + " l")
  17. else:
  18. logging.info(str(x) + " " + str(y) + " r")
  19.  
  20. with Listener(on_move=on_move, on_click=on_click) as listener:
  21. listener.join()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement