360 Secure SkillHub
360 安全技能中心

Win Mouse Native (Windows)

通过本地 cmd + PowerShell 脚本调用 Win32 user32.dll 的 SetCursorPos 与 SendInput,在 Windows 上执行相对/绝对移动、左中右键点击与按下/抬起,命令返回一行 JSON 结果;脚本以 .txt 形式分发,需手动重命名后使用,且仅面向 OpenClaw 宿主。

lurklight
lurklight
热度 96.70
最近更新 2026-05-11 15:51:31
分类:自动化依赖:代码执行应用场景:自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add win-mouse-native
Metadata
name
win-mouse-native
description
Native Windows mouse control (move, click, drag) via user32.dll. Use when the user asks you to move the mouse, click, drag, or automate pointer actions on Windows.

Win Mouse Native

Provide deterministic mouse control on Windows.

Commands (local)

This ClawHub bundle is docs + scripts-as-text (ClawHub validates “text files only”).

To install:

  1. Save win-mouse.cmd.txt as win-mouse.cmd
  2. Save scripts/win-mouse.ps1.txt as scripts/win-mouse.ps1

Then run:

  • win-mouse move <dx> <dy> (relative)
  • win-mouse abs <x> <y> (absolute screen coords)
  • win-mouse click left|right|middle
  • win-mouse down left|right|middle
  • win-mouse up left|right|middle

Return value: prints a one-line JSON object.

OpenClaw usage

When the user asks to move/click the mouse:

  1. If the user didn’t give coordinates/deltas, ask.
  2. Use exec to run win-mouse ....
  3. Prefer small, reversible actions first (tiny move, single click) when unsure.

Notes

  • Windows only.
  • Uses Win32 SetCursorPos + SendInput via user32.dll.