'Variables with local scope can be declared and initialized here Dim MyDate MyDate = Date() Dim MyValue MyValue = 100 'Procedures with local scope can be implemented here Function MyNewProcedure(nCount) MyNewProcedure = nCount + 1 End Function Function AreaRec(side1, side2) AreaRec = side1 * side2 End Function Sub CheckHiLimit(myValue, myHiLimit) If myValue > myHiLimit Then MsgBox("Value out of range") End If End Sub 'This procedure is executed just once when the graphic module is started Sub Graphics_OnStart() MsgBox("Welcome to the system!") End Sub 'This procedure is executed continuously while the graphic module is running Sub Graphics_WhileRunning() If $UserName = "Guest" Then $MyFlag = 0 End If End Sub 'This procedure is executed just once when the graphic module is closed Sub Graphics_OnEnd() $LogOff() End Sub
When the Sub-routines Are Executed
The execution of the Graphic Script sub-routines on the Server is completely independent of the execution on the Thin Client and Secure Viewer stations.
Calling Graphics Script Procedures in Other VBScript Interfaces
The three predefined sub-routines are strictly local to the Graphic Script interface and are executed only on the events described above. Other procedures defined in the interface, however — under the 'Procedures with local scope heading — may be called in any other Screen Script or Command animation. The procedures are called by using the syntax Graphics.procedure_name.
$NewTag = Graphics.MyNewProcedure($OldTag)