跳至主要内容
小龙虾小龙虾AI
🤖

Windows UI Automation

Automate Windows GUI interactions (mouse, keyboard, windows) using PowerShell. Use when the user needs to simulate user input on the desktop, such as moving the cursor, clicking buttons, typing text in non-web apps, or managing window states.

下载5.4k
星标4
版本1.0.0
general
安全通过
💬Prompt

技能说明


name: windows-ui-automation description: Automate Windows GUI interactions (mouse, keyboard, windows) using PowerShell. Use when the user needs to simulate user input on the desktop, such as moving the cursor, clicking buttons, typing text in non-web apps, or managing window states.

Windows UI Automation

Control the Windows desktop environment programmatically.

Core Capabilities

  • Mouse: Move, click (left/right/double), drag.
  • Keyboard: Send text, press special keys (Enter, Tab, Alt, etc.).
  • Windows: Find, focus, minimize/maximize, and screenshot windows.

Usage Guide

Mouse Control

Use the provided PowerShell script mouse_control.ps1.txt:

# Move to X, Y
powershell -File skills/windows-ui-automation/mouse_control.ps1.txt -Action move -X 500 -Y 500

# Click at current position
powershell -File skills/windows-ui-automation/mouse_control.ps1.txt -Action click

# Right click
powershell -File skills/windows-ui-automation/mouse_control.ps1.txt -Action rightclick

Keyboard Control

Use keyboard_control.ps1.txt:

# Type text
powershell -File skills/windows-ui-automation/keyboard_control.ps1.txt -Text "Hello World"

# Press Enter
powershell -File skills/windows-ui-automation/keyboard_control.ps1.txt -Key "{ENTER}"

Window Management

To focus a window by title:

$wshell = New-Object -ComObject WScript.Shell; $wshell.AppActivate("Notepad")

Best Practices

  1. Safety: Always move the mouse slowly or include delays between actions.
  2. Verification: Take a screenshot before and after complex UI actions to verify state.
  3. Coordinates: Remember that coordinates (0,0) are at the top-left of the primary monitor.

如何使用「Windows UI Automation」?

  1. 打开小龙虾AI(Web 或 iOS App)
  2. 点击上方「立即使用」按钮,或在对话框中输入任务描述
  3. 小龙虾AI 会自动匹配并调用「Windows UI Automation」技能完成任务
  4. 结果即时呈现,支持继续对话优化

相关技能