2.7.1 Visual Basic Script as Sub-Program for Multiple Use
If you would like to have your own sub-program started several times during call handling, insert it as a Visual Basic Script in the "Parameter" tab on the properties side of the start block. At the point in the script, at which the sub-programs are to be started, enter the block "Set Variable", for example, and start the sub-program you want there.
 
It is possible to call one of your own functions, which has been defined in the "Start rule" block, in all blocks that permit the entry of a variable or function. The block "Set Variable" is especially suitable for this purpose. The name of your sub-program will then appear in the field "Variable value" preceded by an equal sign. The entry of a variable in the field "Variable name" is only necessary if your are dealing with a function that provides a return value.
 
This is how you integrate your own script
1 Double-click in the Call Routing Manager on the script into which your own script should be integrated.
The following window appears: "Use of the Graphical Script Editor." with the selected script.
2 Double-click on the block "Start".
3 The following window appears: "Properties of…" with the "General" tab.
4 Move to the "Parameters" tab
5 In the field "User Script:", enter your own script.
6 The sub-programs you have created are thus recognized within this script and can be started.
 
If the script contains syntax errors, the call will be disconnected, even if the faulty sub-program is not used. The Graphical Script Editor is not able to check your script for errors.
 
This is how you start your own sub-program
1 Open the the Graphical Script Editor with the selected script in which you previously integrated your script ( This is how you integrate your own script).
2 At the point in the script, at which the sub-program should be started, insert the "Set Variable" block.
The "Properties of Set Variable" window will appear.
3 Click on found on the "Parameters" tab.
The following window appears: "Set Variable Value".
4 Leave the "Variable name:" field empty.
5 Enter an equal sign followed by the name of the sub-program in the field "Variable value:".
6 Then click on "OK".
If you call several sub-programs, they will be called from top to bottom in the sequence listed.
 
The call for one of your own sub-programs or a system function must always begin with an equal sign (=), otherwise the the Graphical Script Editor interprets the entry as a string and not as a function call.