1 2 3 4 5 6 7 8 9 |
$path="prueba.bmp" $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,'Bmp') $Cave = [System.Drawing.Bitmap]::FromFile('.\prueba.bmp') $Cave.GetPixel(974,1005) |