|
Table of Contents
|
Script EditorThe Script Editor is designed to make it easy to create and edit scripts. Editor BasicsThe 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 scriptsYou 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 variablesThe "Show Current Variables" command will display the current list of system and user variables. Syntax highlightingBy 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 modeEnabling 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 BlocksThe 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. CommandsThese are commands and actions you can perform. ExtensionsThese are extensions such as filters. If the extension supports parameters, the list of parameters will be loaded as well. SetThis provides an easy way to set system values and gives you a reference for them. ValuesThese insert values directly into your script. For example, you can insert a color expression by choosing the color using the Color Picker. Script ManagerThe 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 ScriptIf 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. |