VBScript Interfaces in the Software

The following table provides a summary of the VBScript interfaces supported by InduSoft Web Studio:
Interface Scope for Procedures and Variables Execution Functionality
Global Procedures Graphics and Tasks - Declaration of Procedures
Graphics Script Graphics Script interface only Server (Viewer) + Thin Clients

Declaration of Variables

Declaration of Procedures

Execution

Screen Script Screen where the script is configured Server (Viewer) + Thin Clients

Declaration of Variables

Declaration of Procedures

Execution

Command animation Object where the script is configured Server (Viewer) + Thin Clients

Declaration of Variables

Execution

ActiveX Events Object where the script is configured Server (Viewer) + Thin Clients

Declaration of Variables

Execution

Startup Script All Script Sheets from Tasks Server (BGTask)

Declaration of Variables

Declaration of Procedures

Execution

Script Groups Script Group only Server (BGTask)

Declaration of Variables

Execution

The following illustration shows the scope of each VBScript interface and the order in which they are scanned by IWS:
Figure 1.
Web Studio Help illus vbscript interfaces VBScript Interfaces in the Software

The illustration shows that the Global Procedures are shared by the Graphic Module and the Background Task. However, the other VBScript interfaces are either from the Graphic Module or from the Background Task, and they do not share variables or procedures between them. They are independent of each other.

Note: Although the Graphics Script is scanned by IWS before the Screen Scripts, the procedures and variables declared in the Graphics Script interface are NOT available for any script interface configured on the screens. You must use the Global Procedures interface to implement procedures that must be available for all screens.
When writing your code in a VBScript interface, you can access any tag from the IWS tags database or any function from the Built-in Scripting Language by applying the “$” prefix to the tag/function name, as in the examples below:
  $Time 'Returns the value of the tag Time from the tags database  $MyTag 'Returns the value of the tag MyTag from the tags database  $Open("main") 'Executes the Open() built-in function to open the "main" screen  

Therefore, you can create scripts using built-in functions from IWS, tags from the IWS tags database, VBScript functions, VBScript variables, ActiveX properties, methods or events, and any other interface available. The IWS tags are shared by all modules from IWS, including the Graphic Module and the Background Task.

VBScript Interfaces in the Software