[python-win32] Finding out whether there are any visible windows

Tim Golden mail at timgolden.me.uk
Thu Jun 23 09:46:15 CEST 2011


On 23/06/2011 08:03, Greg Ewing wrote:
> In PyGUI I have a need to find out whether the application
> has any visible windows, so I can quit when the last visible
> window is closed.
>
> However, I can't seem to find a way of iterating over all
> the windows belonging to the application, without also
> getting windows belonging to *other* applications.

I think you're stuck with that (although I haven't trawled
post-XP additions to the API to see if anything's changed).

Just for information, my nearly-what-you-want is here:

 
http://timgolden.me.uk/python/win32_how_do_i/find-the-window-for-my-subprocess.html

but I imagine you're already there if you're asking this question

:)

TJG


More information about the python-win32 mailing list