use strict; use Win32::OLE; use Win32::Clipboard; use Win32::GuiTest qw(FindWindowLike GetWindowText SetForegroundWindow SendKeys); my $ie; my $image; # use existing instance if Internet Explorer is already running eval {$ie = Win32::OLE->GetActiveObject('InternetExplorer.Application')}; die "IE not installed" if $@; unless (defined $ie) { $ie = Win32::OLE->new('InternetExplorer.Application', sub {$_[0]->Quit;}) or die "Oops, cannot start IE"; } $ie->{Visible} = 1; # get the handle and use it to force IE to the foreground SetForegroundWindow($ie->HWND); # use send keys # How Do I Maximise The Current Window, Without Using The Mouse? # Press (SHIFT + ALT + SPACEBAR) then press X SendKeys("%+{SPACEBAR}{PAUSE 5}X"); # How do I get a screen grab, use Print Screen to grab entire screen # use ALT + PRTSCR to get current window or dialog NOT screen ! SendKeys("%{PRTSCR}"); $image = Win32::Clipboard::GetBitmap(); # $image now contains your .BMP