Windows - window status (Running vs Not Responding)
mail at timgolden.me.uk
Fri Apr 11 21:46:24 CEST 2008
> On Apr 11, 1:45 pm, rdahlstrom <roger.dahlst... at gmail.com> wrote:
>> Does anyone know how to determine the window status (Running or Not
>> Responding)? I've tried various methods with no success...
>> This would be on a variety of Windows systems, but all at least XP,
>> and mostly server 2003. Everyone will have Python 2.5.1 on them, and
>> the script would be running locally.
>> Any ideas?
> Basically, I'm looking for something similar to the Process.Responding
> property in System.Diagnostics...
Well one (slightly drastic) possibility might be to use IronPython 
or Python.NET  to invoke the .Net functionality directly. AFAIK there
is no direct alternative: I believe that WMI can be a useful match
for System.Diagnostics but doesn't deal with windows (ie user-interface
elements). Presumably you could find a top-level window for each
process, using something vaguely like this  coupled with this 
and send it a suitable SendMessage to "ping" it. Haven't done it myself
but can't see why it shouldn't work.
All a bit handwavey but maybe it'll point you somewhere...
More information about the Python-list