Docs

RunMacro Documentation

Learn RunMacro from basics to advanced.

Everything you need to start and master RunMacro — from basic commands to advanced automation workflows.

RunMacro robot
Docs Code Run Python Code
🐍 Code

Run a Python snippet in RunMacro

What it does

The Run Python Code command lets you insert and run a Python snippet inside your script. Printed output (stdout/stderr) goes to the log. Use it for complex logic beyond the built-in commands.

When to use it

  • Process data / complex calculations.
  • Call a Python library for a special task.
  • Automate logic the built-in commands do not cover.

Configuration steps

  1. Add a Code › Run Python Code command.
  2. Enter your Python snippet in the editor.
  3. Use print(...) to send output to the log. Save.

Every option explained

Code content

The Python snippet to run. Executed with the machine Python, with about a 60-second timeout.

Real example

Example: compute then print

  1. Run Python Code with print(2 ** 10).
  2. The result 1024 appears in the log.

Tips & common mistakes

Python must be installed and on PATH for this command to run.
The snippet runs as a separate process — it does not directly access workflow variables.
RunMacro robot

Ready to automate smarter?

Download RunMacro and start automating your desktop, browser, and business workflows today.