Captura de pantalla completa
1 2 3 4 5 6 |
$path='F:\power\captura.png' $b=New-Object System.Drawing.Bitmap([System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Width, [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Height) $g=[System.Drawing.Graphics]::FromImage($b) $g.CopyFromScreen((New-Object System.Drawing.Point(0,0)), (New-Object System.Drawing.Point(0,0)), $b.Size) $g.Dispose() $b.Save($path) |
Parte uno, captura de pantalla de la mitad superior
1 2 3 4 5 6 |
$path='F:\power\capturap1.png' $b=New-Object System.Drawing.Bitmap([System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Width, [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Height) $g=[System.Drawing.Graphics]::FromImage($b) $g.CopyFromScreen(0,0,0,$b.Size.Height/2, $b.Size) $g.Dispose() $b.Save($path) |
Parte dos, captura de pantalla de la mitad inferior
1 2 3 4 5 6 |
$path='F:\power\capturap2.png' $b=New-Object System.Drawing.Bitmap([System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Width, [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Height) $g=[System.Drawing.Graphics]::FromImage($b) $g.CopyFromScreen(0,$b.Size.Height/2,0,0, $b.Size) $g.Dispose() $b.Save($path) |