automating screenshots / commandline screenshots
Florian Diesch
diesch at spamfence.net
Wed Aug 12 04:12:19 UTC 2009
"Axel Etzold" <AEtzold at gmx.de> writes:
> I need to take a very large number of screenshots and save them in individual image files.
> I have read about ksnapshot, and I would like to somehow combine it with
> a scripting language, such as Ruby.
> Unfortunately, I couldn't figure out how to:
>
> - send the "print screen key" to X (or KDE or the Kernel or ...), from a script
> - drive ksnapshot from the command line, so as to parse the choices
> that appear in the popup menu as command line options (take a new screenshot, take the whole screen, save the image as ..) .
>
>
> This all works, if I do it by hand, using Alt-key combinations, but not
> in a script.
>
> Is there a way to achieve this with ksnapshot or is there another
> application, that can be used from the command line, specifying the
> options there ?
ImageMagick (package imagemagick) comes with "import"
import -window root screenshot.png
I like that tool. It always creates a screenshot when I forget the
#!/usr/bin/python in a Python script ;-)
Florian
--
<http://www.florian-diesch.de/>
More information about the ubuntu-users
mailing list