Back Home Table of Contents

Script Editor

The Script Editor is designed to make it easy to create and edit scripts.

Editor Basics

The Script Editor provides a code editor for editing the contents of a script and commands to manipulate it. The code editor includes syntax highlighting support which can be turned off in the Options dialog.

Running scripts

You can run the current line by clicking "Run Command under Cursor" or by pressing Ctrl+R. This is helpful for troubleshooting. (Note that you can also run an unrelated command using Alt+R.)

You can run the full script using the "Run Script" button or by pressing F5.

You can stop a running script using the Stop button in the editor, using the Stop button in the NPS status bar, or by pressing Ctrl+Break.

Viewing variables

The "Show Current Variables" command will display the current list of system and user variables.

Syntax highlighting

By default, the script editor will apply syntax highlighting to your code to make it easier to interpret. You can turn this feature off if it is distracting.

Transparent mode

Enabling transparent mode will make the script editor window translucent, allowing you to see the image data behind it while you modify and run your script.

Building Blocks

The Script Editor includes a built-in script reference in the form of "building blocks". Simply click the button and choose the command you have. Some commands will include placeholders wrapped in <brackets> and you will need to replace them with actual values.

Commands

These are commands and actions you can perform.

Extensions

These are extensions such as filters. If the extension supports parameters, the list of parameters will be loaded as well.

Set

This provides an easy way to set system values and gives you a reference for them.

Values

These insert values directly into your script. For example, you can insert a color expression by choosing the color using the Color Picker.

Script Manager

The Script Editor replaces the Script Manager in older versions of NPS Image Editor. You can create, copy, delete, import, and export scripts right from the toolbar. The legacy Script Editor can still be accessed from the Component Manager if you prefer to use it.

Startup Script

If you name a script "Startup", it will run whenever a new instance of NPS Image Editor is opened. This can be helpful for setting up your workspace how you want it.