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 Keyboard IF Clipboard
🔀 Keyboard

Branch on clipboard content in RunMacro

The IF Clipboard command checks the clipboard against a condition and steers the workflow: if true it jumps to one label, if false to another.

Prerequisites#

  • Add IF Clipboard to the macro.
  • Prepare the data or target that IF Clipboard will use.

Supported modes#

  • Desktop Mode

What it does#

The IF Clipboard command checks the clipboard against a condition and steers the workflow: if true it jumps to one label, if false to another. It is a branching tool based on copied data.

Screenshots & video#

RunMacro IF Clipboard command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the IF Clipboard command in RunMacro.

When to use it#

  • Only continue when the clipboard contains a certain string.
  • Skip/stop when the clipboard is empty.
  • Classify data: digits-only, letters-only, equals a value...

When not to use it#

  • Do not use it when the value belongs in a stable variable or IF/ELSE labels are not defined.

Configuration steps#

  1. Make sure the clipboard has data (Copy Text or Set Clipboard first).
  2. Add a Keyboard › IF Clipboard command.
  3. Choose the comparison (equals, contains, greater, empty, digits, letters) and enter the target value.
  4. Set the IF label (if true) and ELSE label (if false).
  5. Place the commands to run under the matching label. Save.

Every option explained#

Comparison mode#

Equals, Contains, Greater (number), Empty, Digits only, Letters only.

Target value#

For Equals/Contains: the string/number to compare — you can enter multiple values (per line or comma) with ANY/ALL mode. For Digits only/Letters only: this field is the set of extra allowed characters besides digits/letters (not a value to compare).

ANY / ALL (match mode)#

With multiple values: ANY is true if at least one matches; ALL is true if all match.

Negate (NOT)#

Enable to invert the result (true becomes false and vice versa).

IF label / ELSE label#

The label to jump to when true (IF) and when false (ELSE). Create labels with the Label command.

Expected result#

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

Real example#

Example: continue only if clipboard contains "OK"#

  1. Copy the status text into the clipboard.
  2. IF Clipboard, mode Contains, target "OK", IF label = continue, ELSE label = finish.
  3. Put the handling steps under the continue label.

Limitations and failure cases#

  • External clipboard contents can change between steps; Browser virtual clipboard differs from OS clipboard and comparison mode controls conversion.

Tips & common mistakes#

Combine Copy Text → IF Clipboard to read on-screen status then decide the flow.
You must create the matching Label for the jump to work.

Verification details#

  • commands/keyboard.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.