Declare a variable (Global/Dynamic) in RunMacro
RunMacro RunnerRunMacro 3.5+
The Declare Variable command creates a named variable to store reusable data.
Dialog & quick setup

- Add a Variables › Declare Variable command.
- Set the variable name (e.g.
email). - Choose the type: Global or Dynamic.
- (Optional) enter an initial value. Save. Reference it as
{email}.
Options reference
Modes & when to use
RunMacro Runner
Best for
- Store a value for use in later steps (e.g. email, name).
- Prepare a variable before assigning data from a file/clipboard.
- Separate dynamic data from fixed content.
Use an alternative when
- Do not use it for a one-off value when Assign Variable is enough and no explicit scope is needed.
Before you run
- Add Declare Variable to the macro.
- Prepare the data or target that Declare Variable will use.
Example workflow
Example: declare a counter variable
- Declare Variable
count, Global, value0. - In a loop, use Calculate to increment
count. - Reference
{count}where needed.
Expected result: After execution, Declare Variable completes the described action and makes its result available to the next step.
Tips & limitations
Use Dynamic for per-loop data (email, password); Global for fixed config.
- The runner manages Global/Dynamic scope; duplicate names change state and variables are not lexical scopes.
Applies to RunMacro 3.5+ · RunMacro Runner · Windows 10/11
