0

I want to make a script that uses "Mouse" and "Keyboard" libraries from Python. What I want it to do is once on a key press (q) the mouse moves to an exact point and left clicks. This is my code so far:

import mouse
def autolay():
    mouse.move(x = "-1919", y = "592")
    mouse.click('left')

Any help?

martineau
  • 112,593
  • 23
  • 157
  • 280
  • How about using pygame's key library? https://stackoverflow.com/questions/24072790/how-to-detect-key-presses/69834797#69834797 – Calvin K Mar 08 '22 at 20:29

0 Answers0