🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.python
Article #50

Re: win32ui.GetActiveWindow() problem

#50
From: Mark Hammond
Date: Mon, 13 Mar 2000 00:00
21 lines
1293 bytes
"Michal Bozon" <bozon@natur.cuni.cz> wrote in message
news:Pine.OSF.4.10.10003131737550.6506-100000@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.
Technical Details
Message-ID: <Gkdz4.9356$vW.26052@news-server.bigpond.net.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <Pine.OSF.4.10.10003131737550.6506-100000@prfdec.natur.cuni.cz>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fd557,1afca329daabaac3
X-Google-Attributes: gidfd557,public
X-Google-Thread: 10dd18,1afca329daabaac3
X-Google-Attributes: gid10dd18,public
From: "Mark Hammond" <mhammond@skippinet.com.au>
Subject: Re: win32ui.GetActiveWindow() problem
Date: 2000/03/13
Message-ID: <Gkdz4.9356$vW.26052@news-server.bigpond.net.au>
X-Deja-AN: 597026564
References: <Pine.OSF.4.10.10003131737550.6506-100000@prfdec.natur.cuni.cz>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Complaints-To: news@bigpond.net.au
X-Trace: news-server.bigpond.net.au 952983974 144.132.23.166 (Tue, 14 Mar 2000 08:46:14 EST)
Organization: BigPond Internet Services (http://www.bigpond.net.au)
NNTP-Posting-Date: Tue, 14 Mar 2000 08:46:14 EST
Newsgroups: comp.lang.python,cz.comp.lang.python