A
A
Afafks1231321321652020-05-08 14:20:17
Python
Afafks123132132165, 2020-05-08 14:20:17

How to track 1 click?

I wrote a script that reads the mouse coordinates when a button is clicked and writes it to a file. And I used keyboard and pyautogui for this. But in the loop, when I press the key, the coordinates are written to the file many times. How to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2020-05-08
@Afafks123132132165

Read the documentation - and at least use keyboard.hook instead of keyboard.is_pressed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question