in reply to Screencapture with Perl on Linux (SOLVED)

I used IPC::System::Simple. I took a screenshot of CNN, and everything was there.

#!/usr/local/bin/perl use strict; use warnings; use IPC::System::Simple qw(capture); my $url = 'http://www.cnn.com'; system("firefox", $url); sleep 30; $url = capture("import -window root MyScreenshot.png"); print $url, "\n";

Replies are listed 'Best First'.
Re^2: Screencapture with Perl on Linux
by sadarax (Sexton) on Dec 06, 2009 at 00:20 UTC
    Thanks for the effort, but tried it and it did not work. Depending on which number of desktop I execute the script from (run from a terminal), it just takes a picture of the my desktop background or I get a blank screen with the windows borders