Variable stopped working

I have a very simple macro which resets several variables to being blank using the action 'Set Variable to Text' . This macro worked fine two days ago, but suddenly today, without even closing the app, the macro doesn't work and even the individual actions don't work. I was able to fix the actions, by copying the name of the variable from the variable inspector list and pasting it into the 'set variable' field in the 'set variable to text' action. Then the action starting working again as if I had 're linked' or 'reconnected' the action to the variable. Any ideas how this happened? Why things stopped working and why this repasting of variable name seems to solve problem?

I would love to help, but since I can't see your macro, and I can't see what steps you took to create the problem, it's tough to give you an answer.

Generally, when I get a problem like this, I try to create the smallest macro possible that replicates the problem, and if that doesn't suddenly illuminate my mind as to what the solution is, I post that macro onto this website and someone else will probably see what I'm doing wrong.

OK thanks! I'm getting very odd and inconsistent behavior all across keyboard maestro on macros that I tested dozens of times the other day and now not working. I will try to make a small version that demonstrates problem and upload.

In the meantime, do you know of anyone who offers personal private coaching on using KM? That may be my best solution. Thanks so much for your help!


Howdy, welcome to the forum! As you might have already figured out, this is a great community full of people who love to help.

If possible, post the macro itself so we can take a look at it and see what might be going wrong. As one of the moderators likes to say, "If we're not testing we're guessing, and guessing often wastes people's valuable time". :laughing: If you need help on how to post the macro, just let us know and we can walk you through it.

If you haven’t had the opportunity to read this tutorial, I highly recommend it. It will help you get the most help for your question.

Tip: How Do I Get The Best Answer in the Shortest Time?

As far as your question on coaching, you should check out the Keyboard Maestro Field Guide by MacSparky.


No I don't know, but this forum is basically a free way to get advice on any KM question that you have, it's like having a personal private coach.

Makes sense thanks.

Im expereincing really strange behavior from KM. It isn't consistent enough for me to describe at this point. Now those variables that didn't work earlier are working! but other stuff (that was very well teste has stopped functioning.

I wonder if I need to re install? or if maybe some p.list or permissions got corrupted?

Or 10… :smiley:


1 Like

I've never seen KM get into a state like that. If anything, I'd suspect the Accessibility subsystem, somehow, as it's been known to get wonky at times. The first thing I'd try is to turn the KM engine off then back on. If that didn't help, try a full reboot.


simple example.kmmacros (1.2 KB)

Thanks griffman. I will try that. Attached is a macro that has one simple action. this did not work a while ago and now suddenly works.

Not worth much, I know, but that one runs fine for me on 10.x in Ventura and 11.x in Sonoma. (Yes, I'm double bifurcated.)



I'm on 12.4 Monterey and KM 11.0.2

any known issues?

I haven't heard of any, but I'm not an authoritative source :).


Hey! I turned engine off and back on and all looking much better!!

I'll do more tests coming up, but that simple turning off and on engine may have solved it. I just ran a complex macro that wasn't working with no issues!

Glad to hear it!


A1 MFCI Step 1.kmmacros (28.4 KB)

Ok. Improvement but still having issues. The attached macro ran just fine, but then when I re ran it, it stopped.. I turned off and on engine again, but still didn't work. Any ideas?

Whenever a macro of mine "just stops" I turn on the KM debugger and run the macro one step at a time. To do that, insert this action at the start of your macro:

Screenshot 2023-12-11 at 20.04.22

Then when the above window appears, click the down arrow. Each time you click down arrow, it will execute one action in your macro. You may discover why your Mac stops. For example, it may "fail" on a specific action. Once you see which action it is failing on, it's easier to diagnose.

OK . I did that and clicked through one step at a time and no errors popped up. the macro worked just fine step by step

That would imply some sort of timing issue. The other thing you should get used to doing is tailing the log file in Terminal:

 tail -f ~/Library/Logs/Keyboard\ Maestro/Engine.log

This will show real time messages, some of which might be useful for debugging.

If something runs fine in the debugger, but then doesn't run automatically, my first suspect is always timing: Check the delays you're using, and ideally see if you can find ways around them (by waiting for a screen to change, button to be present/not be present, etc.) It's not always possible, but it's much more reliable than timing delays.