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 Assign Variable
📝 Variables

Assign a value to a variable from several sources in RunMacro

The Assign Variable command sets a new value for a variable, taken from one of three sources: typed text, the clipboard, or another variable.

Prerequisites#

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

Supported modes#

  • Desktop Mode
  • Browser Mode — Runs in the background through Chrome CDP: when the source is the clipboard, the command reads RunMacro’s virtual clipboard instead of the system clipboard.
  • RunMacro Runner

What it does#

The Assign Variable command sets a new value for a variable, taken from one of three sources: typed text, the clipboard, or another variable.

Screenshots & video#

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

When to use it#

  • Update a variable with freshly copied content (clipboard).
  • Copy a value from one variable to another.
  • Reset a variable with new text.

When not to use it#

  • Do not use it for calculations, regex, or explicit Global/Dynamic declaration.

Configuration steps#

  1. Add a Variables › Assign Variable command.
  2. Choose the target variable.
  3. Choose the source: Text / Clipboard / Another variable, then enter the source value.
  4. Save.

Every option explained#

Target variable#

The variable to receive the new value. If missing, it is created (Dynamic).

Source (Text / Clipboard / Variable)#

Where to take the value from: typed, the clipboard, or another variable.

Source value#

For Text: the content (may contain variables). For Variable: the source variable name.

Expected result#

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

Real example#

Example: save copied content into a variable#

  1. Copy Text some content on screen.
  2. Assign Variable result, source Clipboard.
  3. Use {result} in a later step.

Limitations and failure cases#

  • Clipboard source depends on desktop/virtual context; a missing source variable can produce empty or unexpected output.

Tips & common mistakes#

To create a new variable with a type, use Declare Variable; Assign Variable updates a value.

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.