Script editor

Silverstack’s script editor
The script editor allows you to create, edit and manage Lua scripts directly within Silverstack. Scripts can automate tasks, modify metadata, or trigger external processes as part of a workflow. When attached to workflows, scripts run within the workflow context and can access information about the current job and processed clips.
Below you will find detailed information about the script editor’s user interface. If you want to learn more about creating your own custom scripts, see the article about creating custom scripts.On GitHub, you can also find a technical documentation for developers.
You can open the script editor via the script menu in Silverstack’s main menu or by clicking the Edit button of a script in the workflow configuration window. The script editor is separated into the following sections:
1. Script browser#
The outline displays all scripts that Silverstack currently has access to. In case you added a script manually via Finder into one of the script locations, you can click the refresh icon to reload the view. There are the following three default storage locations for scripts:
- Default: Contains default scripts provided by Pomfort.Please note that the directory is read-only.
- Project: All scripts that should only be used within the current project.
- Shared: Scripts that should be shared across projects.
Right-click a directory or script to open the context menu which gives you access to the following actions:
- Open
- Reveal in Finder
- Open in External Editor
- Duplicate to…
- New…
Refresh icon
Reloads all scripts and refreshes the script browser’s view.
2. Code editor#
Settings icon
The settings provide you access to the following settings and actions:
- Show whitespace: Toggles the whitespace indicators
- Auto-close Brackets: Toggles the automatic closing of brackets
- Autocomplete: When enabled, the code editor shows potential matches. These don’t necessarily need to be available in your current context.
- Color Scheme: Sets the syntax highlighting to a different theme
Zoom in / out icon
Allows to increase or decrease the font size.
Zoom 1:1 icon
Resets the font size to default.
3. Console#
Clear console iconDeletes the console’s output.
Zoom in / out iconAllows to increase or decrease the font size.
Zoom 1:1 iconResets the font size to default.
4. Metadata access (variables)#
This view shows you the values of the variables used in your current script. If the variables are accessed multiple times, the preview will show you each change, including the code line in the script and the previous and subsequent value.
Clip pop-up menu
Allows you to select the clip for which the metadata should be shown. It is only available with a valid context provided by the workflow configuration window.
5. Toolbar#
Run icon
Executes the script when clicked.
Save icon
Saves the script when clicked.
Reference icon
Opens a markdown file containing all available API functions in your preferred application (set by macOS).
Help icon
Opens the developer documentation on GitHub.
Browser icon
Toggles the script browser sidebar on the left.
Variables icon
Toggles the metadata access (variables) view on the bottom left.
Console icon
Toggles the console on the bottom right.
6. Shortcuts#
Here’s a list of shortcuts that can be used in the script editor.
- Cmd-R – Run
- Cmd-S – Save
- Cmd-K – Clear Console
- Cmd-L – Select Line
- Cmd-ß / Cmd+/ – Toggle Comment
- Cmd + – Zoom In¹
- Cmd – – Zoom Out¹
- Cmd-Ctrl-0 – Reset Zoom¹
¹ By default the zoom shortcuts apply in the code editor. For the console, press additionally the Alt key.