win32ui.GetActiveWindow() problem

Mark Hammond mhammond at skippinet.com.au
Mon Mar 13 16:46:14 EST 2000


"Michal Bozon" <bozon at natur.cuni.cz> wrote in message
news:Pine.OSF.4.10.10003131737550.6506-100000 at prfdec.natur.cuni.cz...
> __Hi__ all.
> If you are not Win9x/2000 user, this won't be probably something for
you.
...

> from win32ui import *
> from time import sleep
>
> while 1:

Change this line from:
>     s = GetActiveWindow().GetWindowName()
To:
       s = GetForegroundWindow().GetWindowText()

and you will be right!

Mark.






More information about the Python-list mailing list