I'm losing my mind a bit with KM as it seems sometimes it works, then I elaborate a macro, and it all breaks. Going back to the simplest thing ever, I can't get a list prompt + switch to work and I'm lost:
The end game is to use the switch case to set a bunch of variables that will populate a big insert at the end. But baby steps: any idea why this always pastes the "empty" case no matter which option I choose?
Just looking at your macro image, it looks fine to me.
The only reason I can see why it would paste the "empty" case is if you did NOT choose any of the items in the List. You can easily determine this by opening the KM Preferences > Variables pane and examine the Variable "NoteProjectTab".
You can easily determine this by opening the KM Preferences > Variables pane and examine the Variable "NoteProjectTab".
Is that supposed to fill in dynamically? When I select an option from the list prompt, with Variables pane open and the NoteProjectTag variable selected, nothing happens and I get my "empty" case.
Thanks for the time to post the vid; clearly it works. What's weird is with the new day today and power cycle of computer, it's working for me too now! When I first saw your post I thought maybe it was because I was using keyboard only to select from list but it works now either way.
I also noticed some other macros where a KM variable is being passed to Apple Script that were giving an "error of type -4960" yesterday (made note to troubleshoot when I had time) are now working again today. So, are there any known bugs where KM variables fail until reboot?
Valuable lesson learned: When your Mac starts acting weird, the first line of troubleshooting is to restart the Mac. You may be surprised how often this fixes a mysterious problem.
Don't really know what you mean by that, but in general I have found KM to be a very solid, stable, robust app. Bugs and inconsistencies are very rare.
To be candid, most weird problems are some type of user error and/or misunderstanding. That is excepting, of course, the security and accessibility issues that started with macOS Mojave, and have gotten worse with each new release.
Debugging
One very important skill to learn with any programming tool, and KM is a programming tool, albeit a visual one, is debugging. This means finding bugs in your code (Macro Actions) and design, not in the tool itself.
Some Key Debugging Techniques
To inspect Global Variables, use the KM Preferences > Variables panel and/or the Window > Value Inspector
Use the Display Text In a Window Action at key places in your Macro to show values of all types of Variables.
Use the Macro Debugger to step through your macro to observe which branches it takes, and to view data from #1 at each step.
Thanks for your helpful reply. My experience with KM has also been one of robustness thus I never thought to power cycle to fix the behaviour, especially as there was no error message; I assumed it was user error.
I had the same issue happen today, where variables across KM failed silently. Force quitting KM Engine and relaunching fixes it so at least I don't have to close everything to restart. I don't know yet what is causing it so seems a bit vague to report.
Some Key Debugging Techniques
Thanks for those tips! Two of the three are new to me so that's valuable info.
So my guess is your Mac is getting messed up by something, and then Keyboard Maestro is suffering because of that.
You should never have to force quit Keyboard Maestro or Keyboard Maestro Engine, and while yes, there are very occasionally bugs, none of this sounds anything like a Keyboard Maestro bug, it sounds like your system is messed up. As to what is causing it and what other things may be happening, that is very hard to guess at.
It has just happened on a different computer: I have to quit KM Engine and restart for the variables to not return empty. It still could be something messed up but it is trickier now that it is on two systems, one having been freshly re-installed a month ago.