Shane Clark schrieb:
> Hi,
> 
> I am trying to do some Windows automation and I am having alot of
> trouble with even finding the names of the controls that I would like
> to manipulate. I need to launch a media player and play a file, so I
> wrote a quick little script to just grab the name of the control under
> my mouse when I click. It fails miserably in many programs with the
> following error:
> 
> Exception in thread Thread-5:
> Traceback (most recent call last):
>   File "C:\Python25\lib\threading.py", line 460, in __bootstrap
>     self.run()
>   File "C:\Python25\lib\threading.py", line 625, in run
>     self.function(*self.args, **self.kwargs)
>   File "comhook.py", line 23, in ShowButton
>     print pacc.accName()
>   File "C:\Python25\Lib\site-packages\comtypes\__init__.py", line 607, in 
> __call
> __
>     return self.getter(self.im_inst, *args)
> COMError: (-2147024809, 'The parameter is incorrect.', (None, None, None, 0, 
> Non
> e))
> 
> Am I completely misunderstanding something or going about this the wrong way?

Your code works fine for me (well, most of the time, if I click into internet 
explorer
or notepad dialogs or menu, for example).  Maybe some objects or controls do not
implement this needed functionality?

Thomas


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to