Dec-29-2018, 05:59 AM
My script periodically needs to control mouse/keyboard to do things for a few seconds then give the control back to user. This script just disable them, not what I want. Please advise. Thanks.
import pythoncom, pyHook def uMad(event): return False hm = pyHook.HookManager() hm.MouseAll = uMad hm.KeyAll = uMad hm.HookMouse() hm.HookKeyboard() pythoncom.PumpMessages()