[python-win32] monitoring application controls...
Brian Jarrett
bjarrett at garcoschools.org
Tue Nov 15 21:01:44 CET 2005
What you need are Windows hooks, which allows you to participate in the
window procedures for other processes. Implementing a hook requires
code in a DLL, because the DLL has to actually be "injected" into
another process, to run in that processes context. That would usually
make Python unsuitable, but there are people doing research in
accessability that have done it:
http://www.cs.unc.edu/~parente/tech/tr01.shtml
Note particularly the libraries for pyHook and pyAA.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
Tim,
Thanks for your reply. I had looked at pyHook before, but not the pyAA
module. That definitely looks more promising, but so far I haven't
found a way to make it track events for something like a combobox, just
the actual windows. Of course I'm working from extremely limited
experience with the Windows (COM) API, etc. I've also found some
information on WM_COMMAND messages(?) that might hold some answers as
well.
Here is MSDN information specifically on the ComboBox message that
indicates when it has been updated:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc
/platform/commctls/comboboxes/comboboxreference/comboboxmessages/cbn_edi
tchange.asp
If I could find a way to hook in and receive those sorts of messages, I
think that'd be the ticket, but again I am not well versed in these
matters.
As I find more info I'll post to this list.
Thanks for the tips.
Brian
More information about the Python-win32
mailing list