[python-win32] Click detection in Windows (was 'HookMessageFailure?')
Daniel F
nanotube at gmail.com
Sun May 8 22:23:54 CEST 2005
> > Is there any way to simply detect *all* mouse clicks in
> > Windows? I'd prefer to detect when it's clicked in the
> > application, but if necessary I'm fine just trying to detect
> > all of them and seeing if my desired application is the
> > foreground window.
> >
> > Is this possible? How would I go about doing this?
>
> You probably want something like SetWindowsHookEx - see MSDN. This is not
> wrapped by pywin32 - you may find ctypes useful for using it.
>
or even better, try using the pyHook module (which wraps
SetWindowHookEx through ctypes for you already, presenting a
convenient python interface). just google "pyhook".
-d
More information about the Python-win32
mailing list