Docs

RunMacro Documentation

Create your first robot, then go further as needed.

Clear step-by-step guides to create, run, and improve robots for repetitive computer work.

Docs Variables Declare Variable
📦 Variables

Declare a variable (Global/Dynamic) in RunMacro

The Declare Variable command creates a named variable to store reusable data.

Prerequisites#

  • Add Declare Variable to the macro.
  • Prepare the data or target that Declare Variable will use.

Supported modes#

  • RunMacro Runner

What it does#

The Declare Variable command creates a named variable to store reusable data. Pick Global (kept for the session) or Dynamic (temporary, frequently changing), with an initial value.

Screenshots & video#

RunMacro Declare Variable command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the Declare Variable command in RunMacro.

When to use it#

  • 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.

When not to use it#

  • Do not use it for a one-off value when Assign Variable is enough and no explicit scope is needed.

Configuration steps#

  1. Add a Variables › Declare Variable command.
  2. Set the variable name (e.g. email).
  3. Choose the type: Global or Dynamic.
  4. (Optional) enter an initial value. Save. Reference it as {email}.

Every option explained#

Variable name#

The identifier used as {var_name} in text fields.

Type (Global / Dynamic)#

Global keeps its value across the run; Dynamic is temporary data that changes often (e.g. per loop).

Initial value#

The value set at declaration time. May contain other variables.

Expected result#

After execution, Declare Variable completes the described action and makes its result available to the next step.

Real example#

Example: declare a counter variable#

  1. Declare Variable count, Global, value 0.
  2. In a loop, use Calculate to increment count.
  3. Reference {count} where needed.

Limitations and failure cases#

  • The runner manages Global/Dynamic scope; duplicate names change state and variables are not lexical scopes.

Tips & common mistakes#

Use Dynamic for per-loop data (email, password); Global for fixed config.

Verification details#

  • commands/variables.py
RunMacro robot

Robots do the work. Your time is yours.

Create a robot in minutes, no coding needed. Reliable execution, remote management, transparent costs — and you always stay in control.