ScriptTap
ImgFind

Command video guide

ImgFind

ImgFind checks a selected part of the screen for reference images. It can tap a match, save matching results for later commands, or do both. This Overview tours the editor without pressing Test or Play. The palette names the command ImageFind, inside Capture.

Create a separate named script and manually drag the command from the palette into the editor. Open its placed row to configure it. Basic exposes the everyday matching settings; Advanced adds scan order, target coordinates and result modes. Switching back to Basic clears Advanced-only settings.

Area limits the screen region to search. Resize its handles or drag inside to reposition it. Reuse an existing reference through Recent Gallery or Browse All Scripts; do not recreate the same crop for each command. The shared Asset Creation tab explains all crop tools. Keep distinctive stable pixels, use as few non-transparent pixels as practical, and exclude blended semi-transparent edges that change with the background.

Confidence starts at 90. A higher percentage is stricter; 100 requires exact active pixels. Tap Target can tap a matching picture. Set Variables independently enables saved results. Basic uses full names such as Boolean b1 and Integer coordinates x1/y1. Use In selects This Script Only or Script Thread; readers must use the same scope.

Advanced Find 1st can search left-to-right or right-to-left and top-to-bottom or bottom-to-top. Center taps the match center. Fixed coordinates tap the configured X/Y instead, using literals or prior Integer variables; coordinate outputs still describe the matched image, not that fixed tap point.

Classify adds matched asset State, numbered Index, Found, X/Y and measured Confidence outputs. When several assets qualify, saved asset order determines the identity; no match reports Unknown. The scalar Classify practical is currently deferred while its Confidence output type is being reconciled with the documented contract.

Find All collects multiple locations. Max Results defaults to 255 and accepts 1–4096 or a prior Integer variable. Standard stores a Count plus aligned X and Y arrays. Classify offers Count plus Asset Index, X and Y arrays. Results are ordered top-to-bottom, then left-to-right. With Tap Target ON, every accepted result is tapped in that order; fixed coordinates are a Find 1st-only behavior. Provide output arrays with enough declared capacity and keep paired indexes aligned.

Boolean Array stores one Boolean result per selected asset, not one per matching position. Switching result mode clears outgoing destinations, so configure the new fields afterward. Negative Assets can reject unwanted nearby image matches; this tour mentions them without demonstrating a negative asset.

Header Test checks the current setup before saving. ImgFind performs a check when it runs; it does not wait indefinitely for an image to appear. Use Delay Until → Image for a wait. This option-only tour closes its unsaved draft; the Basic tab will show a complete working example.

Overview

Step-by-step guide

  1. Step 01

    ImgFind looks for a small reference picture inside a chosen part of the screen. It can tap a match or save results for later commands. This overview explains Basic and Advanced controls; the separate Basic guide shows a complete working example.

    ImgFind step 1: ImgFind looks for a small reference picture inside a chosen part of the screen. It can tap a match or save results for later commands. This overview explains Basic and Advanced controls; the separate Basic guide shows a complete working example.
  2. Step 02

    Create a separate blank script and give it a clear name. New scripts appear at the bottom of the library, so scroll there if needed.

    ImgFind step 2: Create a separate blank script and give it a clear name. New scripts appear at the bottom of the library, so scroll there if needed.
  3. Step 03

    We will call this ImgFind Overview. Select the new script and open its editor, leaving other scripts unchanged.

    ImgFind step 3: We will call this ImgFind Overview. Select the new script and open its editor, leaving other scripts unchanged.
  4. Step 04

    The palette calls it Image Find, inside Capture. Drag it into the script, then open its placed row to change settings. Dragging adds the command; opening that row does not add another one.

    ImgFind step 4: The palette calls it Image Find, inside Capture. Drag it into the script, then open its placed row to change settings. Dragging adds the command; opening that row does not add another one.
  5. Step 05

    Basic shows the everyday setup: a search Area, reference assets, Confidence, an optional tap, and optional saved results. The Basic and Advanced switch changes which controls are available. We will start with Basic.

    ImgFind step 5: Basic shows the everyday setup: a search Area, reference assets, Confidence, an optional tap, and optional saved results. The Basic and Advanced switch changes which controls are available. We will start with Basic.
  6. Step 06

    Use In selects the scope for saved output variables. This Script Only keeps the results local. Script Thread makes them available to other scripts in that thread; later readers must use the same scope.

    ImgFind step 6: Use In selects the scope for saved output variables. This Script Only keeps the results local. Script Thread makes them available to other scripts in that thread; later readers must use the same scope.
  7. Step 07

    Area limits where ImgFind searches. Resize the rectangle with its corner handles, or drag inside to move it. Keep the desired picture inside it. If Android asks for screen capture permission, grant it before continuing.

    ImgFind step 7: Area limits where ImgFind searches. Resize the rectangle with its corner handles, or drag inside to move it. Keep the desired picture inside it. If Android asks for screen capture permission, grant it before continuing.
  8. Step 08

    An asset is the reference picture. Reuse the ScriptTap icon portion from the Asset Creation guide; cropping does not need to be repeated here. Recent Gallery and Browse All Scripts help locate existing assets. Selected previews show their numbered order.

    ImgFind step 8: An asset is the reference picture. Reuse the ScriptTap icon portion from the Asset Creation guide; cropping does not need to be repeated here. Recent Gallery and Browse All Scripts help locate existing assets. Selected previews show their numbered order.
  9. Step 09

    Confidence controls how close a picture must match. New commands start at ninety percent. A higher value is stricter; one hundred requires exact active pixels. Use a small, stable asset and avoid blended edge pixels that change with the background.

    ImgFind step 9: Confidence controls how close a picture must match. New commands start at ninety percent. A higher value is stricter; one hundred requires exact active pixels. Use a small, stable asset and avoid blended edge pixels that change with the background.
  10. Step 10

    Tap Target can tap the matching picture. Set Variables can instead, or also, save a Boolean found result and Integer X and Y coordinates. Give destinations full variable names, such as b1, x1 and y1. Later commands can use those saved values.

    ImgFind step 10: Tap Target can tap the matching picture. Set Variables can instead, or also, save a Boolean found result and Integer X and Y coordinates. Give destinations full variable names, such as b1, x1 and y1. Later commands can use those saved values.
  11. Step 11

    Advanced adds multiple-result searches, search directions, negative assets, fixed tap coordinates and extra output modes. Moving back to Basic clears advanced-only settings, so check the command after changing modes.

    ImgFind step 11: Advanced adds multiple-result searches, search directions, negative assets, fixed tap coordinates and extra output modes. Moving back to Basic clears advanced-only settings, so check the command after changing modes.
  12. Step 12

    Find First chooses one accepted match. Its direction switches let you prefer left to right or right to left, and top to bottom or bottom to top. These choices order the physical matches; they do not change what the reference image looks like.

    ImgFind step 12: Find First chooses one accepted match. Its direction switches let you prefer left to right or right to left, and top to bottom or bottom to top. These choices order the physical matches; they do not change what the reference image looks like.
  13. Step 13

    With Tap Target on, Center uses the matched picture center. Set Coordinates uses a fixed X and Y instead. Those coordinates may be literal numbers or earlier Integer variables. Saved match coordinates still describe the picture, not the fixed tap target.

    ImgFind step 13: With Tap Target on, Center uses the matched picture center. Set Coordinates uses a fixed X and Y instead. Those coordinates may be literal numbers or earlier Integer variables. Saved match coordinates still describe the picture, not the fixed tap target.
  14. Step 14

    Set Variables exposes Output Mode. Standard saves the usual found and coordinate results. Classify can identify which selected asset matched, with its name, one-based index, found state, coordinates and measured confidence. The lowest-numbered matching asset wins; no match gives an unknown result.

    ImgFind step 14: Set Variables exposes Output Mode. Standard saves the usual found and coordinate results. Classify can identify which selected asset matched, with its name, one-based index, found state, coordinates and measured confidence. The lowest-numbered matching asset wins; no match gives an unknown result.
  15. Step 15

    Find All returns multiple accepted matches. Max Results defaults to two hundred fifty-five and accepts one to four thousand ninety-six, or an earlier Integer variable. Standard saves a Count and X and Y arrays. Classify also records which asset produced each match, using an Index array. Results follow top-to-bottom, then left-to-right order. With Tap Target on, each accepted match is tapped; fixed target coordinates apply only to Find First.

    ImgFind step 15: Find All returns multiple accepted matches. Max Results defaults to two hundred fifty-five and accepts one to four thousand ninety-six, or an earlier Integer variable. Standard saves a Count and X and Y arrays. Classify also records which asset produced each match, using an Index array. Results follow top-to-bottom, then left-to-right order. With Tap Target on, each accepted match is tapped; fixed target coordinates apply only to Find First.
  16. Step 16

    Boolean Array answers a different question: was each selected asset found? It writes one Boolean row per asset in selected order, not one row per matching position. Repeated copies of the same picture do not create extra asset rows. Changing Output Mode clears the outgoing mode destinations.

    ImgFind step 16: Boolean Array answers a different question: was each selected asset found? It writes one Boolean row per asset in selected order, not one row per matching position. Repeated copies of the same picture do not create extra asset rows. Changing Output Mode clears the outgoing mode destinations.
  17. Step 17

    Negative assets can reject unwanted look-alikes using their own confidence threshold. They are optional and are not demonstrated in this overview. Keep the positive reference small: fewer non-transparent pixels generally mean less matching work.

    ImgFind step 17: Negative assets can reject unwanted look-alikes using their own confidence threshold. They are optional and are not demonstrated in this overview. Keep the positive reference small: fewer non-transparent pixels generally mean less matching work.
  18. Step 18

    Header Test checks the current image setup while temporarily hiding ScriptTap windows, then returns a result. Complete the required fields first. Normal script playback performs the command when that script line is reached; ImgFind itself is not a wait-until command.

    ImgFind step 18: Header Test checks the current image setup while temporarily hiding ScriptTap windows, then returns a result. Complete the required fields first. Normal script playback performs the command when that script line is reached; ImgFind itself is not a wait-until command.
  19. Step 19

    Use the Asset Creation tab for cropping, Basic for a complete find-and-tap example, and the Advanced sections for specialized results. This overview closes its unsaved draft; it has not run a script or tapped the matched image.

    ImgFind step 19: Use the Asset Creation tab for cropping, Basic for a complete find-and-tap example, and the Advanced sections for specialized results. This overview closes its unsaved draft; it has not run a script or tapped the matched image.