How to activate a new window in Python

Miki Tebeka miki.tebeka at
Mon Jul 19 22:16:42 CEST 2004

Hello Milon,

> I am new to Python, and I just wrote a simple script to launch an
> application from the windows's start menu's run command.  (see code as
> follow)  There is an "OK" button on the new application I launched,
> but I can't get Python to click on it because the new window is not in
> focus and I read somewhere off the web that I need to activate the new
> window first before I can do anything on the new window.  I couldn't
> find any useful information off the web, so, can someone please show
> me how to do it?
I don't know where "SendKeys" is coming from but you can use AutoIt through
the COM interface or using ctypes.

Miki Tebeka <miki.tebeka at>
The only difference between children and adults is the price of the toys

More information about the Python-list mailing list