Loop: repeat a block N times in RunMacro
RunMacro RunnerRunMacro 3.5+
The Loop command is a special IF block: it repeats the commands below until it reaches a set number of iterations (fixed or random).
Dialog & quick setup

- Add a Flow › Loop command.
- Choose a fixed iteration count, or enable random and set a min–max range.
- Put the commands to repeat below, then close the block with an End If command.
- (Optional) add an Else branch for what runs after normal exhaustion. Save.
Options reference
Modes & when to use
RunMacro Runner
Best for
- Repeat an action exactly N times (e.g. send 10 messages).
- Loop a random number of times when you need the count to vary between runs.
- Retry a sequence a bounded number of times instead of endlessly.
Use an alternative when
- Do not use Loop when repetition should stop on a changing condition; test that condition instead of using a fixed count.
Before you run
- Add Loop to the macro.
- Prepare the data or target that Loop will use.
Example workflow
Example: repeat sending a message 5 times
- Loop with count = 5.
- Inside: Type Text + Press Enter.
- Close with End If. After 5 iterations, the script continues below.
Expected result: After execution, Loop completes the described action and makes its result available to the next step.
Tips & limitations
Use a Goto inside the loop to exit early when a stop condition is met.
The loop counter resets automatically when it finishes or the macro restarts.
- The runner manages the counter and the block must close correctly with End If; a Goto out of the block can bypass normal completion.
Applies to RunMacro 3.5+ · RunMacro Runner · Windows 10/11
