run_pjsr
Execute a JavaScript snippet in PixInsight via PJSR and get its console output. Use this fallback when no other tool covers the desired operation.
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`. |