/
Use the Shogun Post Script Editor

Use the Shogun Post Script Editor

The Vicon Shogun Post Script Editor is a handy pane that makes writing or editing Shogun HSL scripts easier. Use it to create, execute, and debug script commands to automate frequently used tasks or process complex data.

Use the buttons on the Script Editor toolbar for creating and managing HSL scripts, and to customize the display font and hot keys. Right-click and select commands for rapid access to basic Script Editor editing functions from the Script Editor shortcut menu.

Open the Script Editor

To display or hide the Script Editor:

Do one of the following:

  • On the status bar, select the Script Editor button.

  • Ribbon > Panels tab > Script Editor

Use the Script Editor toolbar

Use the toolbar at the top of the Script Editor to create and manage HSL scripts and customize the display font and hot keys.

Use the following commands and controls on the Script Editor toolbar:

Script management commands

Command Description

New

Create a new script

Open

Open an existing script in the edit area below the toolbar

Close

Close the current script

Close All

Close all open files

Save

Save the current script

Save As

Save the current script as a new script file

Save All

Save all open files

Script creation and execution commands

Command Description

Run

Run the current script.

Record Actions

Start recording actions to include in the current script. The clicks and keystrokes you make while recording get turned into Shogun Post commands.

Command Dialog

Display the Script Viewer, in which you can select from all the available Shogun Post commands. For a selected script, you can use the Copy Syntax, Copy Keyword, and or Edit Script buttons.

Run Selection

Execute just the selected portion of the current script.This is handy during debugging when you want to find out which statements work and which do not.

Customize Script Editor display and hot keys

Command Description

Change font

Change the font family, style and size used to display scripts in the Script Editor.

Change hot keys

Change the Script Editor hot keys assigned to listed commands or reset hot keys to their default settings.

Script debugging commands

Command Description

Toggle Script Debugging

Enter or exit debugging mode, which displays additional buttons that make debugging more advanced scripts easier:


Toggle Breakpoint

Set or clear breakpoints in the script

Clear Breakpoints

Clear breakpoints in the current script

Clear All Breakpoints

Clear breakpoints in all scripts

Step Over

Skip a specified breakpoint

Step Into

Execute the command at a specified breakpoint

Use the Script Editor shortcut menu

Use the Script Editor shortcut (right-click) menu for rapid access to editing functions.

Use these commands on the Script Editor shortcut menu:

Command Description
Cut Cut the selected text from the Script Editor and transfer to the Windows clipboard.
Copy Copy the selected text from the Script Editor to the Windows clipboard.
Paste Paste text from the Windows clipboard to the location indicated by the cursor in the Script Editor.
Find Locates selected text in the Script Editor. This function is case-sensitive.
Replace Replaces the selected Find text with the specified text.
Undo Cancel the last Script Editor operation.
Redo Reinstated the previous Undo operation.