omron — RunVBScript

Appendix: Built-in Scripting Language Tip: The Background Task must be running in order to execute this function. Otherwise, the operation will not be executed and the function will return the value 4 indicating error. For more information, see Execution Tasks . Examples RunGlobalProcedureOnServer Runs a function or sub-routine, as declared in the Global Procedures interface. The procedure is run on the server, but it can be called by any local or remote client. Syntax RunGlobalProcedureOnServer( strNameProcedure , param1 , param2 , … ) strNameProcedure The name of the function or sub-routine to be run. param1, param2, … Parameters that are passed to the procedure.

Parameters must be passed as strings. Returned value This function returns whatever value is returned by the called procedure. Examples Given the following procedure that is declared in the Global Procedures interface: Function AddMe(intNumber) If intNumber >= 6 Then AddMe = 0 Else AddMe = intNumber + 2 End If End Function RunVBScript Executes a statement in VBScript language. Syntax RunVBScript ( strScript , " optTagReturnError " ) strScript Script statement that must be executed by the function.

Page 512 InduSoft Web Studio Tag Name Expression Report( "Disk:Report1.rep" ) Report( "Prn:Report2.rep", 0 ) Report( "Prn:Report3.rep", 1 ) Report( "Pdf:Report1.rep" ) Function Group Execution Windows Embedded Thin Client RunGlobalProc edMuordueleO AncStiveitryver Synchronous Supported Supported Supported Tag Name Expression TagResult RunGlobalProcedureOnServer( "AddMe", "2" ) // Executes the procedure and returns a value of 4. Function Group Execution Windows Embedded Thin Client RunVBScript Module Activity Synchronous Supported Supported Supported