KB calls KB 50 Times?

I’ve been wrestling with the “osascript -e ” issue in order to put it in a loop in the shell, and it worked for a few hours then gave me the (-2740) error for some inexplicable reason.

Since I didn’t really see anyone solve it in a way that was explicable, I decided to have a macro call itself and be terminated by some condition outside the macro itself.

Here’s the question — KB seems perfectly happy to call itself 50 times. Every time, it ends at 50.

Is 50 accidental, or is there a built-in, hard-coded limit in KBM engine?

Wondering also if there's a way to override it.

I just created a simple test macro that executes itself. I ran it and after a while it stopped and this is what was in the KM log file:

KM 1 2020-12-29_18-45-04

So, yes, there is a limit of 50 built-in to KM. This subject has been discussed before in this forum, which you can easily find if you do a search.

What's more - why create so many posts about the same issue: if you need a loop just use the For Each action https://wiki.keyboardmaestro.com/action/For_Each or even the Repeat, Until or While actions.

I was really attracted to the idea of triggering the process from the command line, and I failed to do that. The reason was that I had been successful in using osascript to do that, but then it suddenly stopped working, and nothing I've read or done so far has overcome that.

Thanks!