in reply to Win32 Active Window
This works for me -
use Win32::GuiTest qw/ FindWindowLike SetForegroundWindow GetDesktopWindow IsWindowVisible /; my @handles = grep {IsWindowVisible($_) } FindWindowLike(GetDesktopWindow(), qr/^Microsoft Excel/, undef, undef); die "Too many windows\n" if (@handles > 1); die "Not enough windows\n" if (@handles < 1); my $excel = shift @handles; SetForegroundWindow($excel);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Win32 Active Window
by Grygonos (Chaplain) on Dec 07, 2004 at 13:44 UTC |