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);
In reply to Re: Win32 Active Window
by EdwardG
in thread Win32 Active Window
by esr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |