Windows桌面浏览器远程控制。用于在Discord或本地会话中触发Edge或Chrome执行打开网页、交互、截图、批量下载等操作,并返回证据。
openclaw devices approve 并可通过 tools.exec node=Desktop 执行命令。skills/windows-browser-ops/scripts/)。需求步骤打开网页 + 截图1) launch_edge.ps1 -Url <网址> 2) focus_edge.ps1 3) capture_screenshot.ps1 -Output <路径> 4) 把截图上传给少爷下载文件并打包1) 导航并执行下载 2) 等待 .crdownload 消失 3) download_and_zip.ps1 -SourcePath "C:\\Users\\<USER>\\Downloads" -ZipPath %TEMP%\\edge-export.zip 4) 上传 ZIP
识别类别:
准备环境:若 Edge 未运行先调用 launch_edge.ps1,再 focus_edge.ps1。
执行动作:根据请求选择脚本或自定义 PowerShell。
取证 + 回传:截图 / 保存日志 / 打包下载并上传。
launch_edge.ps1 -Url <初始URL>:若 Edge 未运行则启动(未来可扩展到 Chrome)。focus_edge.ps1:调用 Win32 API 把 Edge 窗口置前。若失败,重启 Edge 并重试。edge_nav.ps1 -Url <目标>:当前版本通过重新打开 Edge 导航,后续可换成 UIAutomation/DevTools。Add-Type -AssemblyName UIAutomationClient 获取控件;参考 references/edge_playbook.md 中的片段。capture_screenshot.ps1 -Output %TEMP%\\edge-shot.png 捕捉全屏。必要时修改脚本以截取指定窗口。Ctrl+P + Enter(后续可通过 SendKeys/AutoHotkey 脚本扩展)。Downloads,等待 .crdownload 文件清空。download_and_zip.ps1 -SourcePath <下载目录> -ZipPath %TEMP%\\edge-export.zip。脚本作用备注scripts/launch_edge.ps1启动 Edge 并可选导航到 URL需改进为检测执行路径 / 支持 Chromescripts/focus_edge.ps1调用 Win32 API 将 Edge 置前后续可加入 ShowWindowAsyncscripts/edge_nav.ps1导航到目标 URL未来替换为 DevTools/automationscripts/capture_screenshot.ps1全屏截图当前抓取主屏;多屏需扩展scripts/download_and_zip.ps1打包下载目录记得过滤旧文件
Windows 本地实测时,将这些脚本复制到
C:\Users\louis\openclaw-scripts\windows-browser-ops\,并使用 WSL 跨环境调用:bash
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe \ -File C:\Users\louis\openclaw-scripts\windows-browser-ops\edge_nav.ps1 \\ -Url "https://www.microsoft.com" /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe \ -File C:\Users\louis\openclaw-scripts\windows-browser-ops\capture_screenshot.ps1 \\ -Output C:\Users\louis\Desktop\edge-shot.png /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe \ -File C:\Users\louis\openclaw-scripts\windows-browser-ops\download_and_zip.ps1 \\ -SourcePath C:\Users\louis\Downloads \\ -ZipPath C:\Users\louis\Desktop\edge-downloads.zip
更多细节与扩展想法见 references/api_reference.md 与 references/edge_playbook.md。
Start-Process msedge。tscon 让会话保持前台。Set-ExecutionPolicy RemoteSigned -Scope CurrentUser。