run_pjsr
Execute a PJSR JavaScript snippet in PixInsight to perform custom operations and return console output. Covers tasks other tools don't support, with optional file includes.
Instructions
Run a PJSR (JavaScript, V8 engine) snippet inside PixInsight and return its console output. Last resort for things the other tools do not cover. Call processEvents() before each long process (BXT, NXT, SXT) so Pause/Abort works. No ES6 module syntax; the snippet is eval-ed as a script, so #include does not work and a top-level return is a syntax error; include prepends files instead. Code that does not parse is refused with its line number before anything reaches PixInsight.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | PJSR code. The value of the last expression is returned. | |
| include | No | Absolute paths of PJSR source files whose contents run before `code`, in this order, in the same scope, so functions they define can be called from `code`. |