Module Expect to control Win32 programs?

Roger Upole rupole at
Mon Nov 6 00:50:00 CET 2000

You could use SendKeys from Window Scripting Host.
However, this has a couple of drawbacks.  It only sends
keystrokes to the foreground window, so you'd have to
make sure your app always stays on top. Also, there's
no feedback so you'd have to have some external way to
check if the action was actually performed.  (Or you
may be able to use win32ui.GetForeGroundWindow
and GetWindowText to check for success/error
messages, but I've never tried this...)
   Roger Upole

"Franz GEIGER" <fgeiger at> wrote in message
news:8u0lte$cuj$1 at
> I have a Win32 App with a rather complex GUI, which still is extended and
> improved. After each major extension it has to be tested. I wonder if
> is a possibility to automate this with Python. There is moule out there
> known as EXPECT. Could this be a possibility? On
> it reads "Environment: Console
> (text based) (...)", so it seems not to be what I'm looking for. The GUI
> speaking of provides a keyboard interface (ALT-...), though.
> Any ideas or links I can follow?
> Regards
> Franz GEIGER

More information about the Python-list mailing list