Xpersona
W

windows-ui-controller

CLAWHUB · Unverified

Windows 软件自动化控制技能包 - 使用 pywinauto 控制微信/QQ/网易云等任何 Windows 应用。包含完整教程、依赖包、最佳实践。 Skill: windows-ui-controller Owner: alimjan8800 Summary: Windows 软件自动化控制技能包 - 使用 pywinauto 控制微信/QQ/网易云等任何 Windows 应用。包含完整教程、依赖包、最佳实践。 Tags: automation:1.0.0, chinese:1.0.0, desktop-control:1.0.0, latest:1.0.0, pywinauto:1.0.0, ui:1.0.0, windows:1.0.0 Version history: v1.0.0 | 2026-03-30T13:21:18.948Z | user Initial release - Complete Windows UI automation tutorial with pywinauto. Archive index: Archive v1.0.0: 4 file

62
Rank
84
Safety
1.5k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.5K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s170zckydfregw1wwn19hw6w4h83gywd:windows-ui-controller
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-alimjan8800-windows-ui-controller/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

12,822 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: windows-ui-controller
description: 'Windows 软件自动化控制技能包 - 使用 pywinauto 控制微信/QQ/网易云等任何 Windows 应用。包含完整教程、依赖包、最佳实践。'
metadata:
  {
    "openclaw":
      {
        "emoji": "🖱️",
        "os": ["windows"],
        "requires": { "bins": ["python"] },
        "install":
          [
            {
              "id": "pywinauto",
              "kind": "pip",
              "package": "pywinauto",
              "label": "Install pywinauto (pip)",
            },
          ],
      },
  }
---

# Windows UI Controller

🖱️ **让 AI 控制任何 Windows 软件 - 微信/QQ/网易云/百度网盘...**

---

## 📦 这是什么?

**Windows UI Controller** 是一个技能包,让 AI 能够:
- ✅ 扫描 Windows 软件界面(按钮、输入框、菜单等)
- ✅ 点击任意按钮
- ✅ 输入文字
- ✅ 智能识别控件(搜索框 vs 聊天输入框)
- ✅ 每步操作后验证成功

---

## 🛠️ 安装依赖

### 离线安装(使用本技能包自带的依赖)

```bash
cd dependencies
pip install --no-index --find-links=. pywinauto
```

### 在线安装

```bash
pip install pywinauto
```

---

## 🚀 快速开始

### 1. 安装依赖

```bash
cd dependencies
pip install --no-index --find-links=. pywinauto
```

### 2. 学习使用

**详细教程请查看**: `README.md`

包含:
- pywinauto 是什么
- 完整使用示例
- ⚠️ 关键警告(每步验证)
- 💡 智能缓存建议
- 📸 视觉辅助纠错
- 编码设置
- 最佳实践
- API 参考
- 常见问题

---

## ⚠️ 关键警告

**每步操作必须扫描验证!不要一次执行多步!**

详见 `README.md` 中的详细说明。

---

## 📁 文件结构

```
windows-ui-controller/
├── SKILL.md              # 本文件
├── README.md             # 完整教程(20 KB)
└── dependencies/         # Python 依赖包
    ├── pywinauto-0.6.9-py2.py3-none-any.whl
    ├── six-1.17.0-py2.py3-none-any.whl
    ├── comtypes-1.4.16-py3-none-any.whl
    └── pywin32-311-cp312-cp312-win_amd64.whl
```

---

## 💡 核心功能

### 1. 每步验证
操作后必须扫描确认成功

### 2. 智能缓存
记住按钮位置和功能,越用越熟练

### 3. 视觉辅助
失败时截图分析原因

---

## 📖 学习资源

- **完整教程**: `README.md`
- **pywinauto 官方文档**: https://pywinauto.readthedocs.io/
- **GitHub**: https://github.com/pywinauto/pywinauto

---

**版本**: 1.0.0  
**创建时间**: 2026-03-30  
**系统**: Windows 10/11  
**Python**: 3.8+  
**许可证**: MIT-0

README.md

# Windows UI 控制教程

## 📚 什么是 pywinauto?

### 定义

**pywinauto** 是一个 Python 库,用于自动化控制 Windows 应用程序。

### 它能做什么?

- ✅ 扫描窗口所有控件(按钮、输入框、菜单、列表等)
- ✅ 点击任意按钮
- ✅ 输入文字到输入框
- ✅ 选择菜单项
- ✅ 拖放文件
- ✅ 等待窗口/控件出现
- ✅ 验证控件状态

### 适用场景

- 微信/QQ 自动发消息
- 网易云音乐自动播放
- 百度网盘自动下载
- 软件自动化测试
- 重复性操作自动化

---

## 🛠️ 安装 pywinauto

### 方法 1: 在线安装(推荐)

```bash
pip install pywinauto
```

### 方法 2: 手动下载安装

**下载地址:**
- **官方 PyPI**: https://pypi.org/project/pywinauto/#files
- **GitHub**: https://github.com/pywinauto/pywinauto/releases

**下载文件:**
- `pywinauto-0.6.9-py2.py3-none-any.whl`
- `six-1.17.0-py2.py3-none-any.whl` (依赖)
- `comtypes-1.4.16-py3-none-any.whl` (依赖)
- `pywin32-311-cp312-cp312-win_amd64.whl` (依赖)

**离线安装:**
```bash
cd 下载的文件夹
pip install --no-index --find-links=. pywinauto
```

### 验证安装

```python
from pywinauto import Desktop
print("安装成功!")
```

### 系统要求

- **操作系统**: Windows 10/11
- **Python**: 3.8 或更高版本
- **权限**: 某些应用需要管理员权限

---

## 🚀 快速开始

### 第一步:导入库

```python
from pywinauto import Desktop
import time
```

### 第二步:创建 Desktop 对象

```python
# 使用 UIA 后端(推荐,支持现代应用)
desktop = Desktop(backend='uia')

# 或者使用 win32 后端(老应用)
# desktop = Desktop(backend='win32')
```

### 第三步:扫描窗口

```python
# 列出所有窗口
for w in desktop.windows():
    title = w.window_text()
    if title:
        print(f'窗口:{title}')
```

### 第四步:找到目标窗口

```python
# 方法 1: 遍历查找
for w in desktop.windows():
    if '微信' in w.window_text():
        target_window = w
        break

# 方法 2: 直接连接
# app = Desktop(backend='uia').connect(title='微信')
```

### 第五步:扫描控件

```python
# 扫描窗口所有控件
for ctrl in target_window.descendants():
    info = ctrl.element_info
    if info.name:  # 只显示有名字的控件
        print(f'[{info.control_type}] {info.name}')
```

### 第六步:操作控件

```python
# 点击按钮
button.click_input()

# 输入文字
edit_box.set_focus()
edit_box.type_keys('你好世界')

# 选择菜单
menu_item.select()
```

---

## 💡 完整示例

### 示例 1: 列出所有窗口

```python
from pywinauto import Desktop

desktop = Desktop(backend='uia')

print('=== 当前所有窗口 ===\n')
for w in desktop.windows():
    title = w.window_text()
    if title:
        rect = w.element_info.rectangle
        print(f'{title}')
        print(f'  位置:{rect.left}x{rect.top} - {rect.right}x{rect.bottom}')
        print(f'  尺寸:{rect.right - rect.left}x{rect.bottom - rect.top}')
```

### 示例 2: 扫描微信窗口

```python
from pywinauto import Desktop

desktop = Desktop(backend='uia')

print('=== 扫描微信窗口 ===\n')

for w in desktop.windows():
    if '微信' in w.window_text():
        print(f'窗口:{w.window_text()}\n')
        
        # 扫描所有控件
        for ctrl in w.descendants():
            info = ctrl.element_info
            if info.name:  # 只显示有名字的控件
                print(f'[{info.control_type}] {info.name}')
        
        break
```

### 示例 3: 点击按钮

```python
from pywinauto import Desktop

desktop = Desktop(backend='uia')

for w in desktop.windows():
    if '微信' in w.window_text():
        # 查找发送按钮
        for ctrl in w.descendants():
            info = ctrl.element_info
            if info.control_type == 'Button'

_meta.json

{
  "ownerId": "kn7fwsz56y277qp1hh13bcsm3s82q1f8",
  "slug": "windows-ui-controller",
  "version": "1.0.0",
  "publishedAt": 1774876878948
}

skill-card.md

## Description:

Windows UI Controller helps agents use pywinauto to scan, click, type in, and verify actions in Windows applications such as WeChat, QQ, NetEase Cloud Music, and Baidu Netdisk.

This skill is ready for commercial/non-commercial use.

## Publisher:

[alimjan8800](https://clawhub.ai/user/alimjan8800)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and agent users use this skill to learn and generate Windows desktop automation flows with pywinauto, including window discovery, control scanning, clicks, text input, waits, and post-action verification.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill enables real Windows desktop automation, including messaging and cloud-storage apps.

Mitigation: Use it only under intentional user direction, verify the target window and control before clicks or typing, and confirm results after each action.

Risk: Broad desktop control can affect sensitive applications if the agent targets the wrong window.

Mitigation: Avoid sensitive apps unless explicitly directed, run under a standard user account, and require explicit confirmation for sensitive actions.

Risk: The workflow depends on pywinauto and related Windows automation packages.

Mitigation: Pin or review the pywinauto dependency before installation and install only in an environment where Windows UI automation is intended.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/alimjan8800/skills/windows-ui-controller)
- [Publisher Profile](https://clawhub.ai/user/alimjan8800)
- [pywinauto Documentation](https://pywinauto.readthedocs.io/)
- [pywinauto GitHub Repository](https://github.com/pywinauto/pywinauto)
- [pywinauto Releases](https://github.com/pywinauto/pywinauto/releases)
- [pywinauto PyPI Files](https://pypi.org/project/pywinauto/#files)
- [Microsoft UI Automation Overview](https://docs.microsoft.com/windows/win32/winauto/uiautooverview)

## Skill Output:

**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration, Guidance]

**Output Format:** [Markdown with Python and bash code blocks]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Windows-only guidance for pywinauto-based UI automation; examples emphasize scanning and verifying each step.]

## Skill Version(s):

1.0.0 (source: server release metadata and artifact documentation)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to windows-ui-controller and adjacent AI workflows.