script_run
Execute arbitrary ExtendScript code in InDesign, optionally with debug mode returning line-level error stack traces.
Instructions
Execute arbitrary ExtendScript code with optional debug mode that returns line-level error stack traces
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| debug | No | Enable debug mode: wraps code in try/catch and returns ExtendScript error stack | |
| timeout | No | Custom timeout in ms | |
| document_id | No | Which open document to act on: a name (see document_listOpen) or a 0-based index. Defaults to the front document. |