473,503 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pyHook equivalent for WH_SHELL hooks?

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
Apr 21 '07 #1
0 1326

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
5108
by: yaktipper | last post by:
WH_JOURNALPLAYBACK and WH_JOURNALRECORD These hooks are difficult to get working in C#, but after much piecing together of various code snippets from different language examples across the Net,...
0
1181
by: Chris Westbrook | last post by:
I want to use the pyHook module to capture all keyboard input and write it to a file. I have a script that works fine with the command prompt, but I have a few issues I need help with. First, I...
0
1218
by: RayS | last post by:
(Note: there's not a lot of traffic on Win32, so I'm cross-posting here...) To debug pyKeyLogger, I wrote this with pyHook (and compiled with py2exe on Win2K), which prints the ascii codes as...
0
2767
by: learner404 | last post by:
Hello, I have a Windows Pyhon-Tk app which need to capture mouse end keyboard events even when the app is not in focus. On Windows so far I've used the excellent PyHook which does the job...
4
6015
by: abcd | last post by:
I am having trouble with pyHook on python 2.4.1. Basically I have a python app that uses pyHook to capture keyboard events and write them straight to a file. The application is running as a...
1
2584
by: JJ | last post by:
I'd like to know whether or not I can use a global WH_SHELL hook in Vista? Thanks
0
1107
by: randy.tucker7 | last post by:
I use pyhook to monitor user usage of keyboard and mouse. According to pyhook specs, event.time hold the number of seconds since the epoch. However, when I use the example source code I get numbers...
1
1834
by: Gandalf | last post by:
hi every one. I have program which uses this pyHook lib, and when I try to compile it using py2exe the pyhook don't work. it gives me no error. the program works fine beside the function of this...
1
1756
by: Gandalf | last post by:
If you want to compile your program the new py2exe release 0.6.8 wont work! the pyhook function will be ignored you'll have to uninstall the 0.6.8 version and to install the 0.6.6 instead ...
0
7074
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7273
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7451
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5572
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.