--- El vie 19-dic-08, 为爱而生 <[email protected]> escribió:
> I use the WORD Only for my example.
> The application I test is similar to the WORD and It
> has't the COM.
The code below opens the Choose Font dialog on my Spanish Windows version:
py> from pywinauto.application import Application
py> app = Application.start("Notepad.exe")
py> app[u"Sin título - Bloc de notas"].MenuSelect(u"Formato->Fuente")
(using an English version, the last line would be
app.UntitledNotepad.MenuSelect("Format->Font") I presume)
There are many examples in the documentation, and some more info at
http://pywinauto.seleniumhq.org/
I think there is a pywinauto users list.
> 2008/12/19 Gabriel Genellina <[email protected]>
>
> > En Thu, 18 Dec 2008 11:28:54 -0200, Simon Brunning
> > <[email protected]> escribió:
> >
> > 2008/12/18 为爱而生 <[email protected]>:
> >>
> >>> This problem also use the following
> discription:
> >>> How to use pywinauto to open WORD and select
> its Menu.
> >>> I can't do that and have no idea why!
> >>> Looking forward your help,Thanks!
> >>>
> >>
> >> Word can be automated with COM. My golden rule is
> that automation via
> >> GUI driving is always a last resort.
--
Gabriel Genellina
____________________________________________________________________________________
¡Buscá desde tu celular!
Yahoo! oneSEARCH ahora está en Claro
http://ar.mobile.yahoo.com/onesearch
--
http://mail.python.org/mailman/listinfo/python-list