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.
powershell
python <SKILL_DIR>\scripts\winguictl.py <command> [options]
CommandPurposeDocumentationwindowList/focus/minimize/maximize/close windowswindow.mdsnapshotGet HWND/UIA/OCR structuresnapshot.mdfindFind elements by text/UIA/OCR/imagefind.mdactionClick/drag/type/scroll/hotkeyaction.mdcontrolWin32 control operationscontrol.mduia-controlUIA element operationscontrol.mdscreenshotCapture window screenshotsscreenshot.mdwaitWait for conditionswait.mdclipboardCopy files/text, get textclipboard.md
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)
powershell
# 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
PriorityMethodCommandReliability1HWND (Win32)control --hwnd <hwnd> clickHighest2runtime_id (UIA)uia-control --element-id <id> clickHigh3automation_id (UIA)uia-control --element-id <id> clickMedium4Image matchingaction click-image --image-path <path>Medium5Coordinatesaction click --relative-x/yLowest
CommandMechanismBest Foraction click --element-idMouse simulation at centerWeChat, custom controlsuia-control clickUIA InvokePatternStandard Windows controls, WinUI3
Recommendation: Try uia-control click first. If no effect, use action click --element-id.
ScenarioCommandWin32 control with hwndcontrol --hwnd <hwnd> clickUIA element with runtime_iduia-control --element-id "42-3155764" clickText-based elementfind ocr "text" → action click --element-idQt applicationsAdd --skip-actions --skip-state for faster UIA
--dry-run: Preview operations before executionrelative_rect = window-relative; absolute_rect = screen-absolute