> 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-en/action-guides/image-search/example-combining-for-image.md).

# Combined example for Image

To create an intelligent automation script that smoothly handles real-world scenarios on the user interface (UI) of a website or software, combining these three actions in a tight logical flow is the optimal solution.

Below is a detailed explanation of the general technical specifications and the steps to set up the flow for a real-world scenario.

#### Core configuration parameters to understand:

* Image: The target image area you crop from the screen to use as matching data for the system.
* Timeout: The maximum time limit for the system to search for the image (only applies to *Wait to image*).
* Threshold: The accuracy rate when matching pixels (usually set from `0.7` to `0.95`). The closer the number is to `1`, the more the actual image must resemble the sample image absolutely. You can adjust this value and test until it fits.
* True color: An option that requires the system to match the original color range accurately. If turned off, the system will convert the image to black and white (Grayscale) for shape recognition, which speeds up scanning but ignores color factors.
* Output variable: A variable that stores a logical value (`True`/`False`) or the coordinates of the point (`X`, `Y`) depending on the selected action.

### Real-world problem: Automatically click "Continue with Google" on Pinterest

<figure><img src="/files/0OJJbbrWxIUaBJSw50oA" alt=""><figcaption></figcaption></figure>

**Step 1: Synchronize page load flow with the Wait to image action**

After you click the *Sign up* button on the Pinterest homepage, the registration form needs a short time to load data onto the screen.

* Configuration method: Point the sample image (Image) to the title of the text line or a fixed component (the Continue with Google button) that will definitely appear on the registration form. Set the Timeout to `10` (10 seconds) and adjust the Threshold accordingly (e.g., `0.7`).
* Operational logic: The script will pause to observe the screen. As soon as the registration form appears, the system immediately activates the next step without wasting time waiting.

<figure><img src="/files/Y0Ljb0d3aImH2N9upQ8M" alt=""><figcaption></figcaption></figure>

**🔹 Step 2: Check for the existence of the button with the Image exists action**

Since Pinterest may display an email input form overlay or show a different navigation message depending on each Profile, we need to check if the Google button is actually on the screen.

* Configuration method: Point the sample image to the four-color "G" icon of Google or the text line Continue with Google. Configure the output variable to store the result.
* Operational logic: The system scans the screen quickly at that moment exactly once. If the Google button appears, the output variable will receive a logical value of `True` (otherwise `False`).

<figure><img src="/files/CfxH3i8GVBscULGaS1Mm" alt=""><figcaption></figcaption></figure>

**🔹 Step 3: Filter processing conditions with the If block**

To ensure the script runs intelligently and does not miss clicks, we wrap the interaction steps in the conditional block.

* Configuration method: Add an If block and set the condition: Check if the result variable from Step 2 returns a value of `True` (meaning the Google button is ready on the screen).

<figure><img src="/files/4pLyAGMM3z0yySm4czy0" alt=""><figcaption></figcaption></figure>

**🔹 Step 4: Find the exact position in the If block with the Image search action**

Inside the If block, when the condition is met, the system begins to trace to get the coordinates of the button (since the position of the registration form may shift flexibly depending on the screen resolution of each Profile).

* Configuration method: Use the sample image of the "Continue with Google" button or the "G" logo. Set True color to `Yes` *(Must be enabled to accurately recognize the 4 original colors characteristic of Google, avoiding confusion with other letter characters)*. Set the output variable to store the coordinates as `pos`.
* Operational logic: The system scans and calculates the exact position of the Google button on the screen (e.g., `$pos = 720,540`).

<figure><img src="/files/GA1ikyEIBM2325zKGzK5" alt=""><figcaption></figcaption></figure>

**🔹 Step 5: Perform a click with the Mouse click action**

This is the final step within the If block to complete the processing flow.

* Configuration method: Select the Mouse click action, and in the coordinate setup box, directly pass the variable found in the previous step into the corresponding box: `$pos`.
* Operational logic: The mouse on the system will automatically move to the exact pixel position of the Google button that has been scanned and execute the click command to continue the login flow smoothly through the Iframe layer.

<figure><img src="/files/SX88TseZAi4mT0yhqtjm" alt=""><figcaption></figcaption></figure>


---

# 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-en/action-guides/image-search/example-combining-for-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.
