I have no idea what's going on with this. I have a macro that I've been running for at least two years that's suddenly stopped working. I did a little troubleshooting and figured out that my 'Prompt for User Input' action is no longer creating variables.
I set up a brand new macro (attached) with just the 'Prompt for User Input' action - using the same variable names as in the problematic macro - and was able to reproduce the error. Neither restarting the engine nor rebooting the machine helped. I'm on KM 11.3 under Mac OS 14.5. Any help would be appreciated.
What I would do here is turn on the KM Debugger, make sure there's a checkmark for "Pause New Macros", (in the upper left corner of the window) make sure the "Show Variables" button is pressed (it's an "X" in the upper right corner of the debugger window, and it need to be "bright" to be on) then trigger macro. I would press the Step button to make your macro execute one step at a time (it's a down arrow button.) Every time your macro changes a variable, that variable is displayed in the window (up to ten variables are displayed, I think.)
This way you should be able to see the value of your variable(s) throughout the life of the macro.
My guess, just a guess, is that the Prompt action is correctly setting the variables, but that somewhere else in your macro the variables are getting reset to empty values. By using the debugger, you will find out where that is.
Every single day of my life, probably every hour, my variables are not set correctly, (I write a lot of macros) and this is exactly what I do every time to find out why.
There are alternate methods. For example there is the "Value Inspector" under the KM Editor's Window menu, where you can enter the names of the variables you want to view. Sometimes that can be helpful, but it's limited to global variables and half of my variables are local, so I usually don't use that feature. But I think it could work for you in this case. You might need to right click in the Value Inspector window and make sure it's set to "Show in Background." Even so, you may still want to use the debugger with this feature.
One final idea that might help is you can really slow down your macro (for debugging this issue) by adding an action at the top of your macro like this:
This will cause a 1 second pause between every statement in your macro. This could be useful when using the Value Inspector window, because you can be sure that the window will "see" every value of your variables, which may help since KM normally runs so fast you might not see/notice a value being set. Using this method, you may not need to use the Debugger, and you may still get an idea of where and when your macro is setting your variables to empty strings.
Thanks for the detailed reply, I'll give that a try when I'm back in front of my machine. However the macro I attached is just one step so I can't imagine the variables are being reset/deleted. Unless I'm missing something obvious?
Yikes again. That's interesting, and that's good troubleshooting on your part. It's pretty rare that the KM Engine fails, most of the time it's "us users" who are doing something wrong, so I'm still pursuing the idea that something you are doing is wrong. (Your macro works fine for me.)
I would still absolutely try to debug this while viewing the variable while the macro is running using one of the methods I outlined above. In your case, since this is just a single action, maybe a simpler approach is to simply "display" the variable inside the macro. I would therefore add this to the macro:
If you do this, you will see what the KM Engine thinks are in those variables immediately afterwards, in your notification pop-ups at the top right of the screen.
Using the KM Debugger to view variables is "preferred" over the Display Text action because that way you don't have to copy the variable name into the Display action. Sometimes we mis-type variables when we copy them.
Hmm... when you "created" the brand new macro, did you "copy" the problematic action from the original macro, or did you add the Prompt for User Input action from the KM Editor's Action Pane? This might be important.
It gets worse though - no 'Prompt for User Input' action is working in any macro that I've built.
If I'm doing something wrong, it would be a mystery to me as I've been running these same macros for years without issue. Not sure if this is relevant or not, but when I opened my Mac a couple of days ago, it rebooted itself - I guess it had shut down while sleeping? It feels like that's when my KB troubles started.
Well, at least 90% of the time when people have problems, the problems are caused by people doing something wrong, not a problem with the KM Engine, so please pardon me for trying to confirm that it's not the former.
Earlier you said that if you added a "1" to the variable name, it works. But here you are saying none of your actions is working now. So now I'm confused about what the symptom is. Does adding "1" not longer fix it?
Sorry, I certainly didn't intend to sound snarky! I was just trying to convey that I hadn't made any changes to macros that had always worked reliably.
I'd only added a "1" as a troubleshooting measure on this one macro, I haven't tried it out across my entire macro library. Even then, it only seems to work on one of the variables.
So, I started to think that having numbers in the variable names was the issue.... but this other action in a different macro (which is supposed so save the value returned by which button is clicked) isn't working either.
I've tried my best, and I'm still stumped. I might be going down the wrong path, and I go on vacation tomorrow, where I will have no Mac access, so we need to call in some of the bigger guns here. Sorry I failed you.