| name | win-screenshot |
| description | Capture screenshots on Windows (full screen, region, or specific window). |
| metadata | {"openclaw":{"emoji":"📸","os":["win32"]}} |
win-screenshot
Capture screenshots on Windows using PowerShell and .NET System.Drawing.
No external dependencies — uses built-in Windows APIs.
Pair with OpenClaw's image tool to analyze captured screenshots.
Full Screen Capture
powershell.exe -NoProfile -Command "
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
$screen = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds
$bmp = New-Object System.Drawing.Bitmap($screen.Width, $screen.Height)
$g = [System.Drawing.Graphics]::FromImage($bmp)
$g.CopyFromScreen($screen.Location, [System.Drawing.Point]::Empty, $screen.Size)
$bmp.Save('OUTPUT_PATH', [System.Drawing.Imaging.ImageFormat]::Png)
$g.Dispose(); $bmp.Dispose()
Write-Host 'Saved to OUTPUT_PATH'
"
Replace OUTPUT_PATH with the desired file path (e.g., $env:TEMP\screenshot.png).
Region Capture
Capture a specific rectangular area (x, y, width, height):
powershell.exe -NoProfile -Command "
Add-Type -AssemblyName System.Drawing
$bmp = New-Object System.Drawing.Bitmap(WIDTH, HEIGHT)
$g = [System.Drawing.Graphics]::FromImage($bmp)
$g.CopyFromScreen(X, Y, 0, 0, [System.Drawing.Size]::new(WIDTH, HEIGHT))
$bmp.Save('OUTPUT_PATH', [System.Drawing.Imaging.ImageFormat]::Png)
$g.Dispose(); $bmp.Dispose()
"
Replace X, Y, WIDTH, HEIGHT with pixel coordinates.
Multi-Monitor (All Screens)