> 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/image-search/wait-to-image.md).

# Wait to image

此操作可帮助工具暂停并持续"监视"屏幕,直到目标图像出现(或等待超时)。

* 作用:对于同步非常必要,确保网页或应用程序已加载完数据后工具才继续运行,使脚本不会因网页未及时加载而出现操之过急、执行步骤错位或误点击的情况。

🎥 观看更多教程视频:[点击此处](https://youtu.be/xWu0g35YTGo)。

> ⚠️ 关于缩放比例(Scale)的特别注意事项:您截取样本图像时的屏幕缩放百分比和浏览器分辨率,必须与脚本实际运行时完全一致。如果截取样本图像时屏幕显示比例为 100%,但运行 Profile 时系统却自动以 80% 或 125% 的缩放比例打开,图像扫描算法将无法识别目标的像素结构,从而导致结果出现偏差。

#### 实际示例:等待登录按钮完全显示

当您将浏览器导航至某个网页时,由于网速变化,"登录"按钮可能立即出现,也可能需要几秒钟才能加载完成。设置固定的等待时间(Delay)可能会浪费时间,或者在网速过慢时仍然出错。使用 Wait to image 将使脚本处理更加灵活:

* 配置方法:您截取"登录"按钮的一小段图像作为样本图像,设置最长等待时间以及图像扫描的精确度。
* 结果:脚本将主动等待,一旦"登录"按钮刚在屏幕上显示出来,系统就会立即识别到,并转到下一个操作,而不需要浪费多余的等待时间。

> 💡 *关于样本图像区域配置(Image)、等待时间(Timeout)、颜色偏差(Threshold)、True color 以及输出变量(Output)等详细参数,将在结合 Wait to image、Image exists 和 Image search 这三个操作的组合使用指南部分进行深入分析。*


---

# 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/image-search/wait-to-image.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.
