D
D
Dima2021-07-04 13:58:57
Python
Dima, 2021-07-04 13:58:57

How to stop the clicker?

import keyboard
import pyautogui as auto
import sys
def s():
  while True:
    auto.tripleClick( button = 'left' )	
def t():
  sys.exit()	
keyboard.add_hotkey('e', s)
keyboard.add_hotkey('t', t)
input()


How can I stop the clicker robot by pressing 't'?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2021-07-04
@interneterrorhehe

import keyboard
import pyautogui as auto
import sys

def s():
    while not keyboard.is_pressed('t'):
        auto.tripleClick( button = 'left' )
  
keyboard.wait('e', s)

Something like this, read it better in the docs https://github.com/boppreh/keyboard

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question