Thanks, Jerry. Tried that, as well as various other possible names to no avail.
> -----Original Message----- > From: python-list-bounces+hdoran=air....@python.org > [mailto:python-list-bounces+hdoran=air....@python.org] On > Behalf Of Jerry Hill > Sent: Friday, September 11, 2009 3:09 PM > To: python-list@python.org > Subject: Re: Use python to execute a windows program > > On Fri, Sep 11, 2009 at 12:46 PM, Doran, Harold > <hdo...@air.org> wrote: > > I am working with this now. I'm toying with the examples to > test out a > > few things and learn how this works. I've made some > modifications such > > that I have the following working (below). This does > nothing more than > > open a program. > > > > I have commented out the portion > > > > #app.AM.MenuSelect("File->Open Database") > > > > When it is uncommented, the program fails. However, when I > tinker with > > this MenuSelect() for, say, Notepad, this presents no problem and > > behaves as expected. For example, the following works with notepad: > > > > app.Notepad.MenuSelect("Help->Help Topics") > > > > At the risk of sounding too silly, how do I know what to > place after > > app.??.MenuSelect? I've tried this with a few programs and > the name I > > use in place of ?? Doesn't seem to work. > > I'm not very familiar with pywinauto myself, but a quick look > through the docs says that the application looks for a window > or dialog with a "similar" name to what you put there. So, > what does the title bar of the window opened by AM.exe say? > You should use a name that is "similar" to the title of the > window you're trying to control. > > -- > Jerry > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list