run_lua
Execute Lua code inside REAPER to complete multi-step automation in one call, return values, and get line-specific errors; set a timeout for slow tasks.
Instructions
Run a Lua snippet inside REAPER (reaper in scope). Use return to send a value. Best for multi-step work that would otherwise be many round-trips. Errors carry the failing line. timeout (seconds, default 10, max 600) is for slow work; REAPER is frozen meanwhile, so start long host commands in the background (io.popen('cmd > log 2>&1 &')) and poll instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| timeout | No |