Answer the question
In order to leave comments, you need to log in
I wrote a simple anti-afk based on pydirectinput and pyqt5, when the start button is pressed, the application crashes, what should I do?
used import pydirectinput as pyd
def add_functionts(self):
self.btn_start.clicked.connect(self.start)
self.btn_end.clicked.connect(self.end)
self.gag= True
self.start_thead=threading.Thread(target=self.start)
self.start_thead.start()
def start(self):
print('start')
while self.gag==True:
pyd.press('w')
def end(self):
print('The end of the programm')
self.gag =False
return self.gag
Answer the question
In order to leave comments, you need to log in
The application simply does not respond after pressing the 'Start' button (start function)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question