How to drive a Windows GUI? (PyNewbie)

optopianet at netscape.net optopianet at netscape.net
Fri Apr 27 14:22:41 EDT 2001


I'm attempting to programmatically drive an application window from Python, much like "macro recorder" or automated testing software.

Has this been done? I haven't found anything obvious.

Using win32ui, win32gui, PyCWnd and others, I can locate the application window (EnumWindows), maximize it (ShowWindow), and bring it to the fore (BringWindowToTop).

At the moment, I'm stumped as to how to activate menus.
I'd like to have the menus pop up and have each item highlighted in turn until the desired selection, which is then activated.

Do I use spy to capture the "messages" and try to replicate the behaviour using SendMessage?
Is there a better way?

   thanks,
   - gordon
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/




More information about the Python-list mailing list