Skip to content

jshaofa-ui/win-control-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Win Control - Windows 桌面控制技能

统一的 Windows 桌面自动化解决方案,整合 Windows-MCP、desktop-control、desktop-automation-ultra 三大核心能力。

快速开始

1. 安装依赖

# 安装 UV 包管理器
pip install uv

# 安装 Windows-MCP 依赖
cd C:\Users\Administrator\.openclaw\agents\wuji\workspace\skills\Windows-MCP
uv sync

2. 配置 MCP 服务器

# 使用配置助手
powershell -ExecutionPolicy Bypass -File "C:\Users\Administrator\.openclaw\agents\wuji\workspace\skills\win-control\scripts\mcp_config_helper.ps1" -Action install
powershell -ExecutionPolicy Bypass -File "C:\Users\Administrator\.openclaw\agents\wuji\workspace\skills\win-control\scripts\mcp_config_helper.ps1" -Action configure

3. 启动 Windows-MCP

uvx windows-mcp

功能清单

✅ 窗口管理

  • 列出所有窗口
  • 聚焦/最小化/最大化/关闭窗口
  • 窗口分屏(左右/四角)
  • 启动应用

✅ 键鼠模拟

  • 文字输入
  • 快捷键发送(Ctrl+S、Alt+Tab 等)
  • 鼠标点击/移动/滚动

✅ 高级功能

  • OCR 文字识别(需 Tesseract)
  • 图像识别(需 OpenCV)
  • 宏录制与回放
  • MCP 协议支持

使用示例

窗口分屏

# Chrome 左屏
powershell -File scripts\window_manager.ps1 -Action snap -Target "Chrome" -Position left

# VSCode 右屏
powershell -File scripts\window_manager.ps1 -Action snap -Target "Visual Studio Code" -Position right

宏录制

# 开始录制
python scripts\macro_runner.py record my_macro.json

# 回放宏
python scripts\macro_runner.py play recorded_macro/my_macro.json

MCP 配置

# 查看状态
openclaw mcp list

# 配置 Windows-MCP
openclaw mcp set windows-mcp '{"command":"uvx","args":["windows-mcp"]}'

文件结构

win-control/
├── SKILL.md                          # 技能文档
├── README.md                         # 本文件
├── scripts/
│   ├── window_manager.ps1           # 窗口管理
│   ├── input_simulator.ps1          # 键鼠模拟
│   ├── macro_runner.py              # 宏录制/回放
│   └── mcp_config_helper.ps1        # MCP 配置助手
└── recorded_macro/                   # 宏文件存储

安全提示

⚠️ 重要: 本技能具有完全系统访问权限

  • 关闭窗口/结束进程前会要求确认
  • 宏录制时避免输入密码
  • 部分操作需要管理员权限

故障排除

Python 版本错误

确保使用 Python 3.13+:

python --version

MCP 服务器超时

首次运行需安装依赖,等待 1-2 分钟后重启。

窗口未找到

使用 list-windows 查看确切标题:

powershell -File scripts\window_manager.ps1 -Action list-windows

相关资源


维护者: 无极 (wuji) 技术内阁
版本: 1.0.0
最后更新: 2026-03-31

About

Win Control - 智能 Windows UI 控制技能,模拟人的操作方式:需求识别→截图识别→规划操作→执行→验证→汇报

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors