pyHook equivalent for WH_SHELL hooks?

  • Thread starter =?ISO-8859-15?Q?Jan_B=F6cker?=
  • Start date
?

=?ISO-8859-15?Q?Jan_B=F6cker?=

Hi,

i want to write an app which has to log various user activity, such as opening
folders and office documents, to help the user keep an overview about what open
windows are related to one task he/she is currently doing.

I thought of using a windows shell hook, which notifies the program similar to a
keyboard hook when a top-level window is created or destroyed. The pyHook
extension shows that this is possible, but only supports keyboard and mouse hooks.

My own experiments have not succeeded, as I never have programmed in C/C++
before, let alone a python extension, but I am willing to learn. (I managed to
do a test extension without any useful functionality).

I have difficulties understanding how my hook will cope with multithreading. As
far as I understand, a windows hook dll is loaded into the address space of
every running program. How does a hook handle concurrency and how exactly does
it call the python function? Will the python function run on another thread? How
do I call a python function on another thread?

pyHook claims to be open source, but I could only find the python part of the
source, the C part seems to be missing on sourceforge.net (correct me if I am
wrong).

Is there already something like pyHook for WH_SHELL hooks?
If not, how does pyHook work internally and is its C source available?

I would be glad if anybody could help or point me in the right direction. I
already tried the de.comp.lang.python and a web forum full of nerds ;)

Regards,
Jan Böcker
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top