Problems with Move and Click, Moving super and clicking super slow, Why?

Hey everyone, I’m new here and really excited to learn more! I’ve been working on creating a macro to automate uploading YouTube videos, but I’ve run into some frustrating issues.

When I made my first macro to automatically like YouTube videos, everything worked perfectly—it was fast and smooth. But as soon as I started working on a second macro, things got weird. The "Move and Click" action started acting super slow. At first, the mouse wasn’t moving at all, so I checked all the permissions on my Mac to make sure Keyboard Maestro had everything it needed. After resetting my Mac and Keyboard Maestro, the mouse started moving, but now it’s moving ridiculously slowly and clicking just as slow.

What’s worse, when I went back to test the first macro (the one that worked perfectly before), it’s now barely responding. Sometimes it takes a full minute or two to do anything. I’m not sure what’s going on, and it’s driving me a little crazy.

Does anyone know what could be causing this? I’ve attached both my first macro (which used to work fine) and the second one that seems to have triggered all these problems. Any help would be amazing—thanks in advance!
bad one
good one

You are very welcome to ask questions here. KM is an amazing product. There are many amazing people on this forum who like to answer questions. (I'm not so amazing myself, but I do like to help people.) Some of my ideas below are about trying to solve your problem, and some of them are about improving your approach. You certainly don't have to change your approach if you don't want to.

Let me ask, how are you triggering your macros? I see your images, but those macros don't contain any triggers.

You talk about "the mouse not moving at all." I presume what you mean by that is that the mouse isn't moving towards the images in your actions. Am I right? There are many possible causes for that. But I'm not sure I can find the answer without knowing how you are triggering these macros.

Second, it may help if you upload your macros, because there is an option for your actions called "Wait for Image." Perhaps you set that option. That might explain it. You said "I've attached macros" but you didn't actually attach them, you just uploaded a screen shot. Sometimes a screenshot is enough, but I don't think it is for this puzzle.

Third, your approach could be improved. You don't need to use an IF statement. You could simply have two consecutive actions: one to click on the dark image (with error detection and notification turned off) and the other to click on the light image (with the same options turned off). This will not only simplify your macro but avoid some types of errors.

Fourth, using the option called "Unique" is probably not a good idea. It's usually better to choose "Best". I won't explain why right here. Give this a try.

Fifth, it's probably better to split your code with an IF action that executes one branch of code if the front application is Safari, and the other branch if the front application is Firefox. This will improve the speed of your code.

Sixth, did you check your KM Engine error log? Quite often there's useful information in there. At the very least it will confirm whether your macros were triggered. But your macros currently have no triggers, so I'm very puzzled how they can work at all.

Seventh, have you checked your free memory with the macOS Activity Monitor application? There are times when certain apps are grabbing too much RAM and the KM Engine has to be restarted. When was the last time you restarted your KM Engine?

Eighth, I don't think you should be using "Find Image" at all. There's an action called "Press Button" which is much faster and more reliable than Find Image. You should read up on it. I suspect it will work for you here. Although finding out what's causing your problems would be ideal, I suspect your problems would disappear if you used this approach instead of using Find Image.

Hym, thank you for your response.

I am using a Elgato stream deck.

yes, the mouse doest not move towards the image,

I did that and yes, it works fine, thanks

The main issue I'm experiencing is that Keyboard Maestro occasionally gets stuck. I’ve checked my computer's memory, and there doesn’t seem to be any problem there. I’m not sure if I’m doing something wrong or if it’s an issue with my computer. For example, the macro that automatically likes a video on YouTube works perfectly sometimes, but when I press the button on the Stream Deck, it either takes some seconds to activate or doesn’t activate at all.

In KM lingo, the word "activate" and "trigger" have specific meanings. When you say "activate" you probably meant "trigger." That's okay, but I have to clarify that for our discussion. But how do you know it didn't trigger? Just because a macro doesn't do the actions that you want doesn't mean that it didn't trigger. There are different ways to check if a macro has triggered, such as looking in the log file, or using the KM debugger. I think the first thing you should do is actually check if the macro triggered. That will tell us if the problem is in the code or in the trigger. Right now we can't tell if the problem is in the code or in the trigger because you can't checked if the macro has triggered.

Okay, and which plugin for Elgato Steam deck did you install? I am guessing that you are using KMLink. Is that correct? This may be a factor. Remember, Keyboard Maestro has no control over Stream Deck software.