← 返回
未分类 中文

Windows Desktop Automation CLI

Windows desktop automation CLI. Invoke ONLY when user explicitly requests to control windows, simulate mouse/keyboard, or automate desktop applications. Do N...
Windows 桌面自动化 CLI。仅在用户明确请求控制窗口、模拟鼠标/键盘或自动化桌面应用程序时调用,请勿随意使用。
easyteacher easyteacher 来源
未分类 clawhub v0.6.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 836
下载
💾 0
安装
1
版本
#latest

概述

Windows Desktop Automation with winguictl

⚠️ Security Notice

This skill directly controls Windows desktop through mouse/keyboard simulation. Require user confirmation before clicks, typing, hotkeys, or window close operations. Use --dry-run to preview. Close sensitive apps before use.

Script Path

python <SKILL_DIR>\scripts\winguictl.py <command> [options]

Commands

CommandPurposeDocumentation
---------------------------------
windowList/focus/minimize/maximize/close windowswindow.md
snapshotGet HWND/UIA/OCR structuresnapshot.md
findFind elements by text/UIA/OCR/imagefind.md
actionClick/drag/type/scroll/hotkeyaction.md
controlWin32 control operationscontrol.md
uia-controlUIA element operationscontrol.md
screenshotCapture window screenshotsscreenshot.md
waitWait for conditionswait.md
clipboardCopy files/text, get textclipboard.md

Parameter Types

ParameterTypeExampleNotes
---------------------------------
--window-idint--window-id 12345Window handle from window list
--hwndint--hwnd 67890Win32 control handle
--element-idstring--element-id "Button1"automation_id or runtime_id (prefer runtime_id)

Core Workflow

# 1. Identify window
python scripts\winguictl.py window list

# 2. Focus window
python scripts\winguictl.py window --window-id <id> focus

# 3. Get snapshot
python scripts\winguictl.py snapshot --window-id <id> uia

# 4. Find & interact
python scripts\winguictl.py find --window-id <id> uia --text "Submit"
python scripts\winguictl.py uia-control --window-id <id> --element-id <elem_id> click

# 5. Verify (re-snapshot)
python scripts\winguictl.py snapshot --window-id <id> uia

Decision Guide

Locator Priority

PriorityMethodCommandReliability
----------------------------------------
1HWND (Win32)control --hwnd clickHighest
2runtime_id (UIA)uia-control --element-id clickHigh
3automation_id (UIA)uia-control --element-id clickMedium
4Image matchingaction click-image --image-path Medium
5Coordinatesaction click --relative-x/yLowest

Click Method Selection

CommandMechanismBest For
------------------------------
action click --element-idMouse simulation at centerWeChat, custom controls
uia-control clickUIA InvokePatternStandard Windows controls, WinUI3

Recommendation: Try uia-control click first. If no effect, use action click --element-id.

Common Scenarios

ScenarioCommand
-------------------
Win32 control with hwndcontrol --hwnd click
UIA element with runtime_iduia-control --element-id "42-3155764" click
Text-based elementfind ocr "text"action click --element-id
Qt applicationsAdd --skip-actions --skip-state for faster UIA

Key Rules

  • Re-snapshot after actions: UI state changes after clicks/typing
  • Use --dry-run: Preview operations before execution
  • Prefer runtime_id: More reliable than automation_id
  • Report window_id: Always include exact window identifier in results
  • Coordinate system: relative_rect = window-relative; absolute_rect = screen-absolute

Application Guides

References

版本历史

共 1 个版本

  • v0.6.0 当前
    2026-05-07 03:57 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Docker Essentials

arnarsson
核心 Docker 命令和工作流程,包括容器管理、镜像操作和调试。
★ 38 📥 32,723
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 687 📥 331,459
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 198 📥 68,312