Stream Gateway Scripting Enginer is a powerful and flexible tool to write rich scripts based on C#.


From Stream Explorer, select Scripts and click on the Add button.



Enter an appropriate file name and press OK. The scripting editor will open.


The Scripts Editor interface consists of the following areas (marked by numbers in the screen shot below):


1. Tool bar

2. Code snippets bar

3. Compile status.

4. Coding area

5. Tabs



Following are the details of these areas:


1. Tool bar

Consists of the following commands:

- Standard commands: Save, Copy, Paste, Undo and Redo.

- Compile command  : Used to try to compile the code and validate it. (The result of the trail will be shown in the status bar as will be described below in the status bar section).


2. Code snippets bar

This bar consists of a number buttons. Each button adds of commonly used code snippet based on C# syntax.


3. Compile Status

This bar shows the compile status of your code when you click .

The result of the compile shows two values:

- Status: Either OK or the error message.

- Time: Compile time is shown here to give you an idea about the execution time.


4. Coding area

This area is for writing your C# code.


5. Tabs

Three tabs are available:

a. Coding area

b. Settings

c. References.


Settings Tab:



Script Execution


  • Enable Script:  Select this option to enable the script execution at runtime.
  • Enable Tag: (Optional) Add here a tag name. At runtime, if the tag value is True, the script execution will be enabled and vice versa.
  • Execution Cycle (Seconds): The scripts executes cyclically. This settings sets the frequency of the execution.


References Tab:



You can reference any dll and use it inside your script.


Note: We highly recommend placing the dlls (or any asset) inside your application folder. This helps not forgetting any external reference when the application folder is used in a different machine.