Answer the question
In order to leave comments, you need to log in
How to stop autoclicker with hotkey?
I decided to write a mega super powerful autoclicker. It's so powerful that it's hard to turn it off. Here's the question: How to turn off the autoclicker? But with a hot key. Help pliz already covered all Google, but there is no sensible answer.
Code:
import mouse
import keyboard
from time import sleep
while True:
if mouse.is_pressed(button = 'left'):
while True:
sleep(0.01)
mouse.double_click(button = 'left')
Answer the question
In order to leave comments, you need to log in
I don’t really rummage in pythons, but as an option, create a variable in which the status will be on / off ( true \ false ) and substitute this variable instead of true in the cycle, therefore, when the key is pressed, change the value of the variable, which will stop / start the click cycle.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question