sub grabWindowRegion { my $ds = new Win32::GuiTest::DibSect; $ds->CopyClient(shift,[@_]); $ds->SaveAs('temp.bmp'); return parseBMP('temp.bmp'); }