How it works
- Give it a name, such as count, and a value, which can include results from earlier steps.
- The default scope is this run only; the advanced scope can save it for this routine or for every routine instead, like Remember does.
- It returns the value it set.
- Leaving the name empty fails the step.
Routines that use it
Loop counter
Inside a Repeat, raise a count with Calculate and Set variable, then stop repeating at ten.
Keep a path handy
Store a folder path once and use it in List files, Move or copy file and Zip files.
Hold an answer
Save the reply from Ask for input and use it in Type text later.
Settings
| Setting | What it does |
|---|---|
| Name | The variable's name ("count" or "vars.count"). |
Questions
- How do I use variables in KeyRoutines?
- Add Set variable with a name and value, then pick that variable in later steps' settings. It lasts for the current run unless you change the scope.
- Can a variable keep its value after the routine ends?
- Yes, switch the scope to routine or global. Remember does the same in a simpler form.