Getting name of control under mouse in Windows?

Shane Clark shanesclark at hotmail.com
Sun Nov 18 19:10:18 EST 2007


----------------------------------------
> To: python-list at python.org
> From: gagsl-py2 at yahoo.com.ar
> Subject: Re: Getting name of control under mouse in Windows?
> Date: Sun, 18 Nov 2007 13:32:54 -0300
> 
> En Fri, 16 Nov 2007 16:16:25 -0300, Shane Clark   
> escribi�:
> 
>> I am trying to get my python app to output the name of the control under  
>> the mouse each time it is clicked. Currently, I am trying to do this  
>> with a combination of pyhook and pyAA, but pyAA gives me "pyAA.Error:  
>> -2147417843" for almost any control in Microsoft Office apps, for  
>> example. If it matters, I am trying to retrieve the control's name based  
>> on the mouse position coordinates.
> 
> pywinauto does that.
> 
> -- 
> Gabriel Genellina
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list

Thanks for the response. Pywinauto is more or less incompatible with Office apps so far as I can tell. According to what I have read, this is because Office does not use standard Windows controls. For more info: http://forums.openqa.org/message.jspa?messageID=28199

Shane

_________________________________________________________________
You keep typing, we keep giving. Download Messenger and join the i’m Initiative now.
http://im.live.com/messenger/im/home/?source=TAGLM


More information about the Python-list mailing list