use Win32::GUI(); use Win32::Capture; my @WIN = FindWindowLike('hier kommt der fenstername rein'); # Find the HWND to be captured. if ($#WIN < 0) { print "Not found"; } else { foreach(@WIN) { my $image = CaptureWindowRect($_, 2, 0, 0, 400, 300); $image->SaveToFile("screenshot.png"); } }