win32 application scripting

Alex Martelli aleax at aleax.it
Fri May 10 02:24:33 EDT 2002


Eric Hagemann wrote:

> hey all,
>     I am looking to automate a win32 application (that does not use COM).
> Is there a module with a function similar to popenX that would allow me to
> send characters to the application after it is started ?
> 
>     I have tried the os.popen and win32api.popen but no luck.

There's a SendKeys method in an object (WShell?) of Microsoft's Windows
Scripting Host, which you could use.  But you do need COM in your Python
to access WSH.  There's a recipe on the Python online Cookbook at
aspn.activestate.com, I think -- search for SendKeys.


Alex




More information about the Python-list mailing list