Skip to content
Scapiera
User Guide
User Guide

Code Editor

Write Lua automations with API completions, parameter annotations and error feedback.

The Code tab provides Lua syntax highlighting and completions for the app’s scripting API. It requires the scripting feature. Use Help to check supported methods, signatures and examples for the active context instead of guessing API names.

1

Open Code

Open an automation in Editor, then choose Code if available. If your account does not include scripting, use the supported Visual editor instead.

2

Write supported Lua

Edit the automation source and use completion suggestions for the documented API. Sandbox scripts do not have unrestricted file, system or network access. A method can still be refused when its feature or editor context is unavailable.

3

Define parameters

Use supported --@param annotations or the parameter controls to define inputs. The parser builds the Parameters form from supported declarations. Check the displayed type and default before running; a length and a unitless number have different meanings.

4

Run and diagnose

Use Preview or Run, then inspect Output and error feedback. When an error includes a source location, use the editor’s line feedback to find it. Address any Save failed message; do not assume an unsaved edit is stored.

5

Switch views carefully

Manual Lua edits may produce a warning that the node graph is stale, or use syntax Visual cannot represent. Keep editing in Code when the graph cannot represent the script. Use Export as .lua from More options for a source file.