M
M
MistixM2022-02-06 23:28:10
1C-Bitrix
MistixM, 2022-02-06 23:28:10

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

2 answer(s)
R
Rad1calDreamer, 2016-01-26
@Rad1calDreamer

show sorting field in component call

D
Danya Kozlovskiy, 2022-02-07
@morto

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 question

Ask a Question

731 491 924 answers to any question