Script on near identical mac won't loop properly

Hello I hope my title is appropriate! I have only one macro script I need to run on multiple computers. I unfortunately can't share the script themselves. I have 4 laptops all running the same macro script. 2 of them run flawlessly with very little error and the other 2 seem to get stuck after about 50 cycles of the macro. If I see it paused I move the mouse to the top of the screen and it will resume :confused: That obviously defeats the purpose of the macro.

All the sleep, screen saver, battery saver settings have been taken off and is the same for all 4 computers. I do have 4 different versions of Mac OS but it seems to not be the issue either or I can be mistaken. The 2 that run great are 10.14 and 10.8 MAC OS respectively. The 2 ugly step children that have been bugging me are 10.10 and 10.15. So it is hard to conclude it is due to the OS. Im running KM version 6 on the 10.8 and it runs fine!

My question is if I can not simply copy and paste the script from the macros that are running good. What possible solutions are out there to keep my others running?

All computers have been wiped clean of memory so performance should not be an issue.

Thank you for your time.

*Full disclosure I am no developer or programmer but I can understand and learn on the fly. Please help!

If by "script" you mean the actual Macro, then it going to be very hard for us to be of much help without seeing the actual Macro. If your Macro contains sensitive and/or proprietary info, perhaps you could change that info in a copy of the Macro, and post the copy here.

Please don't use "script" when you mean "macro", since Macros can contain real scripts (AppleScript, JavaScript, Shell Scripts, etc).

What do you mean by "stuck"?
Is this Macro called by another Macro in a loop using Execute Macro?
If so, this could be the issue, as KM will not allow more than 50 macro instances to be running at the same time.

See:

This runs flawlessly on one mac and not the other. I did reference the earlier article about the macro instances, but I do not believe that is the case because this does run perfect on one and not the other. Apologies for the vocabulary I am new to this and am way underpaid to understand it. Thank you for the taking the time to reply!

*Edit, I don't know if stuck was the right term maybe pause. Because if I see it pause I will move the mouse and it will resume normally

fill in referral 1.1.kmmacros (23.0 KB)

Thanks for posting your macro file, but we also need the macro image.
Many of us, including me, need to see the image before we will download/import the macro file.

See How to post/upload your script/macro

Keyboard Maestro 8.2.4 “fill in referral 1.1” Macro

fill in referral 1.1.kmmacros (23 KB)

Thanks for posting your Macro image. A quick scan of it immediately shows one potential issue to me: Almost all of your Pause Actions are toooooooo long. You have them set to 1 sec or more. For simple stuff, like Typing a Keystroke TAB, usually 0.1 is more than enough.

For the sections where you open a new web page, then do a long pause, you might try using this technique: MACRO: Pause Until Web Page Element Exists [Example]

I don't know if these many long pauses are contributing to your looping issue, but they might. IAC, you will be much happier with a quicker Macro.

A development technique I sometimes use when I don't know how long of a pause I need is to initial put in a lengthy pause (maybe 1 sec), to test and develop the Macro. Once it is working, then reduce the Pauses as much as you can. You can use a KM variable in the Pause action, and set the variable at the top of your macro. This makes it easy to change all of the Pauses later.

image
(Ignore the red "invalid". It is there just because the KM Local variable is not yet defined).

When I get more time, I'll take a closer look at your Macro.

There is nothing obviously wrong with your macro, and assuming you are not accidently running this macro multiple times, or other macros are not running, then you should not be hitting Keyboard Maestro’s running macro limit of 50, since this basically just counts as a couple macros (unless there was an Execute Macro action I missed.

What exactly do you mean by “stuck”. Sounds like the action stops happening until you move the mouse and then starts again.

You might like to start the macro debugger and then run the macro and then you can see more clearly what it is doing when it is “stuck”.

Keyboard Maestro will generally not stop except in a macro that explicitly is designed to stop, most notably the Pause Until and Wait For actions. The system, if overloaded, may decide to sleep or stop processing things, so it is possible the Mac is going to sleep (some level of sleep). You might try looking at your Energy Saver preferences, and ensuring the Mac is plugged in.

Thank you for the reply. I will change the pause times accordingly and see if that helps. I will try the other technique if that doesn't work. Will follow up once I get somewhere with this!

Thanks for the reply Peter! I did double check the sleep settings and have it plugged in. The simultaneous macro's aren't happening either. I will try the debugger and see what I can find!

I did speed up the pause times and that helped out the efficiency a lot thank you! I ran the debugger and it would seem to "pause" when the wait for google chrome to finish loading action would need to execute. Not every time but maybe after an hour or so of the macro running.

As mentioned before I have the same macro on another laptop and it runs fine so it may just be specific to this one laptop I have. I will try the pause until web page element exists next!

Have you looked at the Macro Group settings?