A Keyboard Maestro Variable is something that you define. You decide what the Variable is called and what text is stored in it. There is no text stored in it until you put some in - that's why your one Action Macro, Display Text is showing nothing.
The fact that you have given your Variables names that include the words "path" or "file" means nothing to Keyboard Maestro.
Keyboard Maestro does have inbuilt Tokens which look similar to Variables but are different in that they do get values automatically.
%FinderSelection% is an inbuilt Token. It will get the path and name of a selected file in the Finder. Notice it doesn't have %Variable% in front of it.
If you wrote %Variable%FinderSelection% that would be telling Keyboard Maestro to use a Variable that just happens to be called the same as a Token. And that Variable would be empty until you put something in it.
Keyboard Maestro has Tokens for lots of things (but not everything). You can check out the complete list of inbuilt Tokens here:
In addition to everything I have said above, Keyboard Maestro doesn't have any inbuilt Tokens to work with the app Pathfinder. You would need a more complex Macro to get this to work. Try a search for "Pathfinder" on the Forum.
Keyboard Maestro does have inbuilt Tokens to work with Finder. So, if you selected a file in Finder and ran the below, you would see how a Token could be used in a simple Macro.
a great explanation. I will review the list of tokens. I took for grated that if a variable name was "offered" by KM in the list of variables, it was a token.
thanks very much !
Please post actual testable macros and not just images.
Finicky little details hide in macros that are not deducible via images and/or prose, and those are often key to solving a given problem.
The pictures you've shown are virtually meaningless, because the entire macro is not described β nor is there a downloadable, fully visualizable, testable macro file.
Even if you had created a proper image of the entire macro there would still be some of those finicky details hiding behind closed doors...
Note that Keyboard Maestro will accept variable names in the legacy variable format:
%VariableName%
Personally I wish @peternlewis would sunset that feature, because it periodically causes head bashing against the wall problems for users who either don't understand the difference between variables and text-tokens or inadvertently use a token name as a variable name and get very unexpected results.
If Peter jumps in I imagine he'll say: "Changing that would break some people's macros, so ixnay...", although this is one of those things (imo) where the minimal pain for a few users would be worth it.
In any case β I vehemently harp on this point:
<soapbox on>
NEVER, EVER use token notation as text-variable-notation.
I.e. never, ever use %VariableName% when you mean %Variable%VariableName%.
If you ever do this it almost certainly will come back to bite you at some point, and you might well waste hours or days trying to troubleshoot an easily avoidable problem.
Also β if you use the legacy notation you cannot ever be certain at a glance whether a string bracketed with percent signs is a token or a variable β while If you take my advice then you will always know at a glance whether you're dealing with a token or a variable.
Yep. It's a feature I mostly wish I had not created, but it is unlikely to change. Plus for cases like %Local Whatever% it actually works in a safe manner as a short form.