PyrexKidd has asked for the wisdom of the Perl Monks concerning the following question:
How do I determine the window handle of the window that has focus, that is not a child of the Perl process? I thought this would work, but it returns 0 for all windows except the window generated by the perl process.
use 5.010001; my $hwnd = GetDesktopWindow(); my $focus_id = GetFocus($hwnd); say $focus_id;
Though I don't think it makes a difference, I am using Wx to generate a window and a timer event to poll the environment for the window with focus.
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::GuiTest Get Window Focus
by Corion (Patriarch) on Mar 10, 2011 at 10:41 UTC | |
|
Re: Win32::GuiTest Get Window Focus
by Anonymous Monk on Mar 10, 2011 at 10:36 UTC | |
by Anonymous Monk on Mar 10, 2011 at 10:51 UTC | |
by SuicideJunkie (Vicar) on Mar 10, 2011 at 14:20 UTC |