Answer the question
In order to leave comments, you need to log in
What to do if the application crashes while using a certain piece of python code?
Hello. Created a python autoclicker program using pyqt5. But as soon as the clicker starts, the application stops working (as if the clicker itself works, i.e. when the button is pressed, it stops, but the application does not open)
Also, if the time delay value is greater than 0.1, the clicker does not stop, even when the stop button is pressed
Code snippet that performs the function:
def function(self):
self.start_button.clicked.connect(self.auto_clicker)
def auto_clicker(self):
start = self.startkey.text().lower()
stop = self.stopkey.text().lower()
time_delay = float(self.time_delay.text())
while True:
if keyboard.is_pressed(start):
mouse.is_pressed(button = self.comboBox.currentText())
while True:
time.sleep(time_delay)
mouse.double_click(button=self.comboBox.currentText())
if keyboard.is_pressed(stop):
break
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question