> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-zh/action-shi-yong-zhi-nan/mouse/mouse-move.md).

# Mouse move

### 移动鼠标指针的动作（Mouse move）

Mouse move 是控制鼠标指针从当前位置平滑移动到屏幕上指定点的动作。此动作有助于精确模拟真实用户的鼠标移动行为,帮助脚本绕过安全反机器人扫描系统（Anti-bot）。

🎥 观看更多教程视频：[点击这里](https://youtu.be/kQZWs1I76Zo)。

#### 支持的鼠标移动类型：

该动作支持根据2种主要机制灵活移动鼠标：

* 按 XPath 移动：您填写网页上元素的标识路径（XPath）。系统将自动确定该 HTML 标签在界面上的位置，并将鼠标指针移动到该元素的中心。
* 按坐标移动：您直接输入 x,y 轴上的像素点，或传入一个包含坐标的合并变量（例如从 Image search 动作获得的 `$pos` 变量，其格式为 `900,800`）,以引导鼠标指针跳转到屏幕上的精确位置。

#### 💡 高级技巧：拖放元素（Drag and Drop）

您可以组合一系列连续的动作，对界面上的任意元素执行按住、拖动和放置操作（例如：拖动解锁验证码的滑块、拖放 bento grid 方块，或移动棋子），公式如下：

1. Mouse press and hold：在起始元素的位置按住鼠标左键（可以按 XPath 或坐标选择）。
2. Mouse move：将鼠标指针（带着正在持有的数据块）移动到新的目标位置。
3. Mouse release：松开鼠标左键，完成将元素放置到新位置的操作。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gpmautomate.com/automate-zh/action-shi-yong-zhi-nan/mouse/mouse-move.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
