Yes: use the “Set variable to Calculation” or “Set variable to Text” action to define the variable, and insert its name into the text field of the “Pause” action. Don’t use the token %Variable%variableName%, just the name.
But note that in many case you’d better use the “Pause Until” action. It’s very versatile and has the advantage of always pausing for the shortest possible time.
Aha… I used % and was getting the invalid message. Ok… This should be fun
I’ll also get better familiarized with the “wait until” command… but I have a funny feeling it might not be as useful because I’m editing fields in an embedded scripting language in the app… so it’s not fully “aware” of it’s own status.
Have you tried to execute the action?
The test variable is invalid because it has not been set now.
You could run the macro or click the gear icon on set variable and choose
try. This will set the variable.
Ah, Jimmy just posted with the correct reason for your trouble.
Failing to initialize a variable and then being fooled by the invalid flag in the KM editor is a classic mistake I've made myself.
On another note – you're using a Set Variable to Calculation action without actually doing a calculation. If you're NOT going to do a calculation I recommend you use a Set Variable to Text action instead, because a day, a month, or a year from now you may look at your macro and wonder what you were thinking. Both actions will store the variable as text (NOT int or float).
As you can see in the attached macro both actions work fine, once the variables are initialized.