• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Perl [Perl] Funcion screensave()

Status
Not open for further replies.

Doddy

Leech
User
Joined
Apr 1, 2012
Messages
169
Reputation
0
Reaction score
406
Points
63
Credits
0
‎13 Years of Service‎
57%
Hola a todos.

Con este funcion podran sacar una foto del sistema

Code:
>
#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

Code:
>
capture_window()
Y tendran la foto con el nombre de foto.bmp

 
Status
Not open for further replies.
Back
Top