> 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/cao-zuo-zhi-nan/mouse/mouse-movement.md).

# 鼠标移动

### 鼠标指针移动操作 (Mouse move)

鼠标移动是控制鼠标指针从当前位置平滑移动到屏幕上指定点的操作。此操作帮助准确模拟用户真实的鼠标悬停行为，帮助脚本绕过安全防护的反机器人系统 (Anti-bot)。

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

该操作支持灵活的鼠标移动，主要有两种机制：

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

#### 💡 高级技巧：拖放元素 (Drag and Drop)

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

1. 鼠标按下并保持：在开始元素的位置按住左键（可以根据XPath或坐标选择）。
2. 鼠标移动：将鼠标指针（连同正在保持的数据块）移动到新的目标位置。
3. 鼠标释放：松开左键以完成将元素放置到新位置。


---

# 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/cao-zuo-zhi-nan/mouse/mouse-movement.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.
