I'm trying to detect whether or not the left moues button is down or up with pyHook. What I currently have is:
def OnDown():
toggle = True
def OnUp()
toggle = False
hm = pyHook.HookManager()
hm.HookMouse()
hm.MouseLeftDown = OnDown
hm.MouseLeftUp = OnUp
PumpMessages()
hm.UnhookMouse()
From what I can tell, it registered when my mouse is down but not when I release the button. Any idea as to how I can make it work?