Click it 4 times, wait, re-arm

Build a macro that finds a target, clicks it four times with a human gap between clicks, then re-arms itself when the target comes back. You will practice against a page that keeps score, so you can prove it worked.

detect click on match wait loop Free 10 min

The hardest thing for a new user is detection: teaching QHuman to see a thing on screen and act on it. This lab gets you a first win against a target built to be easy to see, so detection feels simple before you point it at a messy real app.

Open the target first. It opens in a new tab. Point QHuman at it and read its score as you go.

Open Click-Target Range

Prefer to watch first? Detection 101 builds this same skill against a different target, start to finish. Then come back and do it yourself here.

The parts that match this lab: Snip your target · The image match · Make it loop

The Click-Target Range shows one amber disc on a dark arena, and it grades every click you fire at it. Press Space on the range to start it; R resets the score between attempts. Out of the box the disc takes 4 clicks, hides for 3 seconds, then re-arms somewhere else, and that "somewhere else" is the whole reason this lab uses detection instead of replaying coordinates.

One full cycle, and the three things the range counts. The middle frame is the score you are aiming for.

Build the macro

  1. Create the detection and snip the disc Press Space on the range so the disc is up. In QHuman, click New Detection on the toolbar and name it, say click range. Open Detection in the left rail, pick your new macro under Macro:, and click Add step...; call the step Click. Double-click the new node, and in its Do: on entry, in order list click Add click.... In the dialog, hit Capture snippet..., drag a small box well inside the amber disc, and name the snippet amber. Staying inside the disc matters: the middle stays pixel-identical every time it re-arms, the soft edge does not.
  2. Aim the click at the match Still in the same dialog, read the defaults once so you know what they mean. Click point on the match on Center, Which matches on Best match only, and Match confidence at 0.80. Click OK, and the step's Do list gains its first row.
    The click, aimed: centre of the best amber.png match. All four values are the defaults.
  3. Add Wait a random moment... after the click In the step's Do list, click Add advanced ▾ and choose Wait a random moment.... Set Wait at least 0.2 s and ...at most 0.6 s. A tiny random gap between clicks reads as a human hand instead of a machine gun, and the row lands in the list as Wait 0.2–0.6s.
  4. Repeat it four times The Do list runs top to bottom, so make it read click, wait, click, wait, click, wait, click: three more Add click... rows (in each dialog, use Browse... to pick the amber snippet you already have instead of re-snipping) with a wait between each. Four clicks empties the disc; the waits keep them apart.
  5. Wire the loop: found in, absent out Click Add step... again, call it Watch, right-click its node and pick Set as start. Now drag Watch's bottom handle onto Click and set the condition: When a target is found / absent, target amber.png, is found on screen. Then drag Click's handle back onto Watch, same mode, is NOT on screen. Read the loop you drew: disc appears, four clicks land, disc vanishes, back to watching. That is the re-arm.
    The whole macro as the canvas draws it: two steps and two conditions.
  6. Watch it first with Try it (dry run), then run it Click Try it (dry run) under the canvas. Observe runs the flow against the live screen without clicking anything: found discs get boxed, and the timeline logs a suppressed would click_match for every click it held back. Once it clearly sees the disc, close Observe, press R on the range for a clean score, and run it for real with Play All (Ctrl+F10). Hands off, and watch the counters.
Checkpoint

After one full cycle the range reads On-target hits 4, Misclicks 0, Ghost clicks 0, and Cycles cleared keeps ticking as the loop re-arms on its own. Let it clear a second cycle hands-off to prove the re-arm is real, then stop the run with Ctrl+Alt+S or by slamming a screen corner.

Make it yours

Now retune it instead of copying it. On the range, set Clicks to clear to 7, then match it in your Click step: three more click-and-wait pairs, with shorter waits. Re-run and the range should read 7 hits per cycle, ghosts still 0. Predict first what happens if you leave the flow at four clicks against a 7-click disc, then try it: the disc stays up, so the absent edge never fires and the flow sits in Click forever. Dialing the two numbers together is the skill; four was just the demo.

If it went wrong

  • Misclicks climbing Clicks are landing beside the disc. Keep Click point on the match on Center, and re-snip a patch from well inside the disc so the match sits square on it.
  • Ghost clicks climbing Something clicks while the disc is gone. Count your Add click... rows: five clicks against a four-click disc fires the fifth into an empty arena. And check the absent edge leaves Click, not enters it.
  • It runs one pass and never re-arms The return edge is missing or backwards. Click needs When amber.png absent → go to Watch, and Watch needs When amber.png found → go to Click, like the step 5 map.
  • It never finds the disc The snippet may be too small or caught the soft rim. Capture a bigger flat patch from inside the disc, and prove it matches in Try it (dry run) before running live.

Stuck?

Grab the finished macro. Download it and open QHuman's Import shared file... to load it, then compare it to what you built. It is a reference to read, not a macro to run: the detection snippet inside was captured on another screen, so it will not match your display. Run with the one you took in the lab instead.

Download the solution (.qhz)

Keep going

Want the full detail behind each step? Read the detection guide. Ready for the next lab? Next up is Click every mole, where you click every match on the Whack-a-Mole board and leave the red decoys alone.