A self-contained "inner" macro that checks whether a value has been passed in from an "outer" macro. If no value is found, set a variable (%Local_NUM_TO_CLOSE% in the example below) to a default value. %TriggerValue% seems like the way to do this, but I can't seem to get it to matter to the If All Conditions Met action.
It's worth noting here that I first started with a simpler condition: If %TriggerValue% is empty, but that suffered the same issue. The failure branch seems to get triggered no matter what condition I use against %TriggerValue%.
Question
Am I doing something "wrong" here, or have I encountered a bug/limitation in Keyboard Maestro?
Well, feature request, I guess: this sort of thing would be more discoverable if the field either had some sort of warning ("This is also the name of a Token…you sure you meant to do this?")… or, better yet, add Token support so that the original thing I tried to do doesn't fail so mysteriously. ¯\_(ツ)_/¯
Peter made this more discoverable by employing field labels, but they are only visible with the text cursor is in the field (none in script fields):
It makes no sense to describe a text token without using text-token-syntax %TextTokenName%, as they can only be used in text fields and must be distinctly not normal text.