Loop Won't Stop

If it's not visible on the screen, KM will not be able to see it.

Can you point us to the webpage URL?

Sorry - bombarding you with messages.

I've reread your original post: what is the actual problem you're trying to solve? Is it:

  1. The repeated clicking on the image while it is onscreen, or
  2. The seeming continued clicking when the image is not onscreen.

The problem is #2. url: https://tinder.com/app/matches

1 Like

I don't have a tinder account so I'm not going to be able to explore any further I'm afraid.

Maybe some other clever KM soul can help out :grinning:

I'm wondering if it is a case of the webpage hiding the button to the user but it still exists on the page, just with opacity set to 100% or something. I'm not sure how the KM image finder works.

KM looks at the screen pixels and tests them against the image swatch you've given it AFAICT. So if you can't see the image on the screen neither can KM.

To test - just check the Display checkbox in the action - it will result in the image that KM finds being highlighted for you to easily see.

What else is going on in your macro?

It seems strange that while the tick image is shown, it clicks each time in the location, but when it is not visible, it moves the mouse to a completely different location and (probably) ticks there.

Is it still within the bounds of the Chrome window?

Create a new, separate macro that looks like this (choose any hotkey you prefer)

KM 0 2021-05-10_16-04-13

When you trigger it, it will stop any running macros.

It is still within the Chrome window.

I've ticked the Display checkbox and get this:

image

Not sure what the 1% refers to, but that image is now pulsing every second. And, it doesn't appear to be clicked anymore.

It seems inconsistent. It started clicking now. But has stopped again.

Question: When you have the Editor open and click Run, does the macro just continue until it stops? What happens if you click Run, then choose another Macro and click that too? Do you then have two running simultaneously. Also, there seems to be no stop button for the macros, so you can break out, which I find a bit odd.

Yes - why wouldn't it? When you run Chrome on your Mac it continues until you stop it, no?

Yes. Your Mac can run any number of apps at the same time - so can KM with macros. However, it is usual to run macros using some kind of trigger - a hotkey for example (as I showed with my "kill" macro above) and NOT have the KM editor open all the time.

It is usual to design macros so that they do not loop forever. But if you create a "rogue" macro that does loop forever then you can use the techniques I gave you earlier to kill it. Equally, you can design macros to run until you press a key too. Most macros that people create however have a beginning a middle and an end so they start, do something(s) and then end. In case you're wondering, the "end" could be that there are no more actions in the macro to be executed, so KM just stops running the macro as there's nothing else for it to do.

Hope that helps.

Which Display checkbox did you click - you have 2 in the screenshot you posted originally?

I tried all combinations on the checkboxes.

When I run Chrome on the Mac, it runs until I close it. I see a tab in Chrome as analogues to a macro in KM. I can just click x to close the tab, but not so in KM to stop the macro.

My macro would be fine if it ended when the button disappears, but for some reason, it continues. Odd.

Perhaps it is some type of glitch that disappears when I get around to rebooting my computer. You never know!

Well, you didn't really answer my question: which checkbox did you click to get that specific result.

Oh - and that's not the image you said you were looking for - it doesn't have a tick in it but a heart. You need to show a screenshot taken of the specific webpage you're looking at when things are going wrong.

Please look at this, too:

KM has a fuzziness selector in the find image action. It finds similar images by default because there are often micro differences due to scaling etc that mean identical matches would fail way too often. So play around with that fuzziness and see if you can isolate it to only find your desired image but not the heart image

2 Likes

I did answer, because I said I tried all combinations. It gave the same result.

It should have pasted the tick image. I'm doing the same macro for another site, which uses a heart instead.

I could do a screenshot but for privacy reasons I don't want to show anyones data. Also, when the tick image has gone, it moves the mouse to a blank area of the screen with no visible image.

KM has a fuzziness selector in the find image action. It finds similar images by default because there are often micro differences due to scaling etc that mean identical matches would fail way too often. So play around with that fuzziness and see if you can isolate it to only find your desired image but not the heart image

In this case, I think the fuzziness does not make a difference. I did have a go at moving the slider, but it tries to click a blank area of the screen with no visible image, regardless of the fuzziness setting.

Update: Ok, today it worked as expected on the page. I updated Chrome yesterday and rebooted the computer and still had the issue. But today, it is working without the glitch. So, fingers crossed, it might have fixed itself somehow. I will keep an eye on it and also see if it is fixed on the other page I am testing.

Assuming it is all sorted, thanks to everyone for the pointers.