Add-Type -AssemblyName System.Windows.Forms,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)
$dir = "C:\Users\Administrator\.openclaw\media"
if (!(Test-Path $dir)) { New-Item -ItemType Directory -Path $dir | Out-Null }
$path = "$dir\screenshot_$(Get-Date -Format 'yyyyMMdd_HHmmss').png"
$bmp.Save($path)
$g.Dispose()
$bmp.Dispose()
Write-Output "MEDIA:$path"
