Open navigation

Script Toolbox

This toolbox can be opened via the Window > Standard Toolboxes menu.

The Script toolbox can be used for running the scripts you create. This is an alternative to running scripts via an external VBS file. The script toolbox offers the following benefits:

  • Syntax highlighting and colour-coding
  • Automatic recognition of built-in objects (Impact, GUI, ActiveDrawing & ActiveDatabase shown in blue)
  • Predefined enumerations (displayed in red text – e.g. etLine, etGraphic, etc.)
  • The ability to run the script in its entirety, or just selected text

Buttons

The buttons along the bottom of the script toolbox provide the following options:

  • Load - this option will load a text file (TXT, VBS) for editing
  • Save - this option will save any changes made to the text within the script toolbox
  • Clear - this will clear the contents of the toolbox
  • Run - this option will execute either the script in its entirety, or simply execute the selected text

Context Menu

On the right-click context menu, you have the following options:

  • Undo - this will undo the previous editing action from the script toolbox
  • Redo - this will redo the previous editing action
  • Cut - this will place the selected contents on the Windows clipboard, as well as removing it from the script toolbox
  • Copy - this will place a copy of the selected contents on the Windows clipboard, while also leaving the selected text in the toolbox
  • Paste - this will insert the contents of the Windows clipboard into the script toolbox at the current cursor position. This will only work if the Windows clipboard contains text data
  • Clear - this will clear the contents of the toolbox
  • Indent - this will indent the selected text. This helps in readability of the code
  • Unindent - this will unindent the selected text.
  • Insert Directive
    • Include Database Script - this will allow you to include the contents of a database script without inserting the actual code. This is done by using the {INC "MyDatabaseScript"} directive and will act as a pointer to the original code in the database.
    • Include Script File - this will allow you to include the contents of an external script file without inserting the actual code. This is done by using the {INCFILE "C:\MyScript.txt"} directive and will act as a pointer to the original code in the file.
  • Pre-Process Script -this will open a separate window displaying the contents of the entire script, which may include both database and file include scripts. This is useful for backup or distribution.
  • Insert File Contents - this will insert the contents of a chosen external file into the toolbox
  • Register COM - this option will register COM with Windows for the current version of Impact

Privileges

If the “Run” button in the script toolbox is unavailable, you may not have adequate Impact privileges to run scripts. The “Use Script Toolbox” privilege is required for your user group in order to run scripts via this method.

The script toolbox is often used in conjunction with the Output Toolbox as a way to write out debugging information.

NOTE: Scripting is an advanced topic and is not intended for all Impact users.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

You may like to read -