Open ipsBruno opened 6 years ago
Hello ...
I have this code
class mouseevent(PyMouseEvent): def __init__(self): PyMouseEvent.__init__(self) def move(self, x, y): global lastKey lastKey = time.time() class keyevent(PyKeyboardEvent): def __init__(self): super(keyevent, self).__init__() def tap(self, keycode, character, press): global lastKey lastKey = time.time() keyHandlerThread = keyevent() mouseHandlerThread = mouseevent() keyHandlerThread.start() mouseHandlerThread.run()
Works fine!
But on close application i get: Runtime Error: R6031
Apparently the threads are not killed. Someone with this problem?
Thanks in advance
You should start and stop event threads with run() and stop() methods, or call thread.join() after start() method.
run()
stop()
thread.join()
start()
Hello ...
I have this code
Works fine!
But on close application i get: Runtime Error: R6031
Apparently the threads are not killed. Someone with this problem?
Thanks in advance