Hola a todos.

Con este funcion podran sacar una foto del sistema
#By Doddy H

use Win32::Clipboard;
use Win32::GuiTest qw(FindWindowLike SetForegroundWindow SendKeys);

capture_window();

sub capture_window {

SendKeys("%{PRTSCR}"); 

my $a = Win32::Clipboard::GetBitmap();

open (FOTO,">foto.bmp");
binmode(FOTO);
print FOTO $a;
close FOTO;

}
Ejemplo de uso
capture_window()
Y tendran la foto con el nombre de foto.bmp
Responder

Volver a “Otros lenguajes de Scripting”