Windows Screenshot

Capture screenshots on Windows using PowerShell and .NET APIs. Use when this capability is needed.

tomevault-io 4e8be65 2 files · 1.7 KB Updated

File contents

Windows 截图

使用 PowerShell 截取屏幕。

命令参考

全屏截图

Add-Type -AssemblyName System.Windows.Forms
$bitmap = [System.Windows.Forms.Screen]::PrimaryScreen
$bounds = $bitmap.Bounds
$screenshot = New-Object System.Drawing.Bitmap($bounds.Width, $bounds.Height)
$graphics = [System.Drawing.Graphics]::FromImage($screenshot)
$graphics.CopyFromScreen($bounds.Location, [System.Drawing.Point]::Empty, $bounds.Size)
$screenshot.Save("$env:TEMP\screenshot_$(Get-Date -Format 'yyyyMMdd_HHmmss').png")

使用 Snipping Tool

Start-Process "SnippingTool" "/clip"

输出规范

  • 默认保存到用户临时目录
  • 截图完成后告知用户保存路径

Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/malue-ai--dazee-small--windows-screenshot commit 4e8be6503f

Frequently asked questions

npx skillmds@latest add tomevault-io/windows-screenshot