I am using this code to detect mouse position with pyhook in Windows. What I need is to detect mouse click and add delay before execution - scenario: I click with mouse but this click should be 0.5 second delayed (so click should be executed after 0.5 second). Is this possible somehow?
import pyHook
import pythoncom
def onclick(event):
print event.Position
return True
hm = pyHook.HookManager()
hm.SubscribeMouseAllButtonsDown(onclick)
hm.HookMouse()
pythoncom.PumpMessages()
hm.UnhookMouse()