Click every mole (and skip the red ones)

Point QHuman at a board full of pop-up moles, click every green one at once, and leave the red decoys alone. You will practice against a page that keeps score, so you can prove the macro clicked the moles and never the traps.

detect click every match decoy rejection Free 10 min

Clicking one target is a warm-up. Real screens have several of the same thing on them at once, and a few lookalikes you must never touch. This lab teaches the two skills that unlock that: matching every instance in one pass, and matching on colour so QHuman ignores the decoy.

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

Open Whack-a-Mole

Prefer to watch first? Make a Bot That Only Clicks One Color builds this exact macro against this exact board, start to finish. Then come back and do it yourself here.

The parts that match this lab: Lock onto the green · Keep it on the board · Click every one · Sweep, wait, repeat

Click the board once so it has focus, then press Space to start it and D to turn Decoys to On. A perfect macro scores nothing on a board that was never started. R resets the score, but it also stops the game and puts the overlay back, so press Space again after every reset. 1 to 4 set the speed.

Nine holes, and only ever a few filled. Green scores a point, red costs you a Decoy hit, and clicking an empty hole costs you a Miss. Each disc is one flat colour behind a thin rim, which is the whole reason a colour match tells them apart: it locks onto the mole's green and never the decoy's red. At Normal a mole is only up for about a second, so the macro has to keep looking, not remember where one was.

Build the macro

  1. Find the mole by its colour With the board running, click New Detection on QHuman's toolbar and name it whack a mole. Open Detection in the left rail, pick it under Macro:, click Add step... and call the step Sweep. Double-click the node, and in Do: on entry, in order click Add click.... In the Click on detected target dialog set Find: to Pixel colour, click Pick colour..., and type the mole's hex #34a853 (the target's header lists it, right next to the decoy's #c0444e) or eyedrop a green disc. This is the whole decoy defence: a colour match locks onto green and simply never touches red. A picture of the disc cannot do that, because template matching reads shape and shading, not hue, so the green mole and the red decoy score alike. Leave Colour tolerance at its default and Minimum area low: the green is nowhere near the red, and the region you add next keeps out everything else.
  2. Bound the detection to the board Still in the same dialog, tick Limit detection to a screen region, click Select region on screen..., and drag a box around just the 3x3 grid. This is not housekeeping. The target paints its own Score digits in the exact same green as a mole, in 46px, right above the board, so an unbounded detection will happily click your own scoreboard. Same-colour lookalikes are beaten by where you look, not just what you match.
    Drag the region to the dashed box, around the grid alone. On a real game screen the same trap is a HUD, a minimap, or a health bar.
  3. Aim the click at the centre Click point on the match already reads Center, which lands the click square in the flat middle of each mole. Leave Offset at X 0, Y 0.
  4. Click Every match on screen One field left. Which matches ships on Best match only, which would click the single strongest mole and ignore the rest. Switch it to Every match on screen and one pass clicks all of them. Click OK; the Do list gains its first row.
    The whole click, in one dialog. The two highlighted fields are your changes; the rest is the colour, the region you drew in step 2, and defaults.
  5. Add Wait a random moment... after it In the same Do list, click Add advanced ▾ and choose Wait a random moment.... Set it to at least 0.2 s and at most 0.5 s. Without it the sweep re-fires as fast as the machine allows, which is both pointless and the least human thing on this page. The row lands as Wait 0.2–0.5s.
  6. Loop it so it keeps sweeping A step runs its Do list once and stops, so send it back to itself: in Then: go to the next step (first match wins) click Add, set Go to step: to Sweep and Move on: to Always (every time). Now it clicks whatever is up, waits a beat, and looks again. A mole is up for about a second at Normal, so a sweep every few tenths never misses one.
    The whole bot: one step. The row lists the colour as its raw BGR triple (the app's blue-green-red order for #34a853), and (all) is Every match on screen — the word that makes it whack-a-mole and not one-mole-at-a-time.
  7. Watch it first with Try it (dry run) Before you let it click anything, hit Try it (dry run) under the canvas. It runs the flow against the live screen and boxes what it matches without clicking or playing anything, so you can watch it box the greens and leave the reds alone. Happy? Press R then Space on the board for a clean run, and set it going for real.
Checkpoint

Give it a real test: Decoys on On, 3 for Fast, and a full minute hands-off. Score climbs the whole way and Decoy hits is still 0 at the end. That zero is the result. Run it too briefly and you prove nothing, because roughly one spawn in three is a decoy, and a full clean minute is what shows the colour is doing its job. Misses staying near 0 is the bonus: it means it is clicking moles, not holes where a mole used to be.

Make it yours

Re-pick the red decoy's colour, #c0444e, instead of the green mole, and run it. The board does not reward you for it: Score stays at 0 and Decoy hits is the number that climbs, because the scoring is fixed no matter what you point at. That is the exercise: aiming the same machine at either disc on purpose, and reading the scoreboard that tells you which one you hit.

If it went wrong

  • Decoy hits climbing With a colour target this should not happen; green and red sit far apart. If it does, your Colour tolerance is cranked high enough to bleed toward red, or you picked the decoy's colour by mistake. Re-pick #34a853 and drop the tolerance. Note the board shows a big MISS on a decoy click but scores it under Decoy hits, not Misses.
  • The Score card gets clicked No region, so the detection found the Score digits, which are the same green as a mole. Tick Limit detection to a screen region and drag it around the grid alone.
  • Only one mole gets clicked Which matches is still on Best match only. Switch it to Every match on screen. The Visible moles card tells you how many it should be taking each sweep.
  • Misses climbing It is clicking holes the mole has already left. That is a timing problem, not a detection one: a mole is up for about a second at Normal and half that at Frantic, so shorten the Wait a random moment... row or drop the speed to 1.
  • It never finds a mole The colour is off, or Minimum area is set so high a whole mole no longer counts. Re-pick #34a853 off a green disc, drop Minimum area back down, and try the dry run again.

Stuck?

Grab the finished flow. Download it and open QHuman's Import shared file... to load it. It runs as-is: it clicks the moles by their colour, not a screen-grabbed snippet, so nothing in it is tied to the machine it was built on and there is nothing to recapture. Its region is drawn for a 1920x1080 board at 100% zoom, so nudge that box over your own grid if your window sits elsewhere, then set it running with Decoys on and watch Decoy hits hold at 0.

Download the solution (.qhz)

Keep going

Want the full detail behind clicking a match? Read the click & press keys guide. Ready for the next lab? Next up is Track the ball, where you keep a paddle glued to Pong's moving ball instead of clicking still targets.

Taking this to a real game

These practice targets are ordinary web pages, so every macro here just works. A real game adds three things to check first:

  • Direct input is off by defaultQHuman sends input the normal way, which reaches almost every app. Full-screen and anti-cheat-aware games often only listen to the lower-level path, so if a macro does nothing inside the game, turn on direct input (Pro).
  • Elevated windows ignore ordinary clicksA game or launcher running as administrator will not accept synthetic input from a non-elevated app. Run QHuman as administrator too, or the clicks and keypresses land nowhere.
  • Full-screen vs windowed, and play fairBorderless-windowed is the easiest to detect and click against; exclusive full-screen can hide the pixels QHuman reads, so windowed or borderless is the safe start. Automating an online game can break its rules or trip anti-cheat, up to a ban, so only automate games where you own the risk.