At 13:14 2002-06-04 -0700, Khan, Moin wrote:
I am trying to look for the title of window(eg. Dr. Watson Error on Desktop) so i can log that error?
any idea?

Not sure what you're after here...

If you want the title (the text in the Titlebar of the window) of the topmost window, here's how to do it:

my $title = Win32::GUI::Text(Win32::GUI::GetForegroundWindow()) || "";

If the DrWatson window isn't put on top, then you'll have to find the window handler (hwind) some other way. I think that you can enumerate the application windows using Win32::ActAcc and/or Win32::GuiTest.

If what you really want is the text displayed _in_ the window, then you can find the hwind of the DrWatson top window, and then using one of the above modules find the control that contains the text.

If you have Visual Studion installed, look at the program Spy++ something that can be used to analyze windows on-screen.


/J

-------- ------ ---- --- -- --  --  -    -     -      -         -
Johan Lindström    Sourcerer @ Boss Casinos     [EMAIL PROTECTED]

Latest bookmark: "Phil's Field Guide to Trolls"
http://home.att.net/~philelmore/fieldguidetotrolls.html



Reply via email to