Re: [Pywinauto-users] System wide hook to WM_MENUSELECT event
Status: Alpha
Brought to you by:
mcmahon_m
From: Mark Mc M. <mar...@gm...> - 2007-09-04 05:43:59
|
Hi TecnoS, On 9/3/07, Techno Scavenger <tec...@gm...> wrote: > Hi all, > > > I have copied shamelessly from SAFS some code and transformed it using swig > so that it can be consumed in Python quite easily. Basically, what it does > is that it will install a system wide hook to trap WM_MENUSELECT event. > I would guess something like this if it was used for a recorder should trap other messages too (keyboard and mouse events for example). Though catching WM_MENUSELECT would probably make it so the resulting script would be more accurate/readable. > > It is currenlty working but I am not sure if there are no memory leaks but > cursory check it is working as expected. > I haven't checked and not good at checking those kinds of things :) > > What I really need is feedback from you guys with the current > implementation. I am also hoping that this will be integrated in the future > version of pywinauto. > I am most interested in EXACTLY how you would like it integrated into pywinauto. For now I see it for recorder functionality - but not for automation - is that correct? > > See attached file for source code. cpython .pyd file was compiled using > Visual Studio. > Which version of Python is it compiled for? I think my preference would be to wrap it manually using ctypes rather than introduce yet another tool into the chain (SWIG - which I have never personally used). > > Regards, > TechnoS Thanks for your code and ideas, Mark |