18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix: Built-in Scripting Language<br />

Examples<br />

When the value of TagOnTrue becomes TRUE (non-zero), execute the procedure UsingOnTrue:<br />

RunGlobalProcedureOnTrue( "TagOnTrue", "UsingOnTrue" )<br />

RunVBScript<br />

Executes a statement in VBScript language.<br />

Function Group Execution Windows Embedded Thin Client<br />

RunVBScript Module Activity Synchronous Supported Supported Supported<br />

Syntax<br />

RunVBScript ( strScript, "optTagReturnError" )<br />

strScript<br />

Script statement that must be executed by the function.<br />

optTagReturnError<br />

Name of the tag that will receive the error (if any) generated by the statement (e.g., "Division by<br />

zero"). The tag name must be configured between double-quotes and it must be a String tag.<br />

Returned value<br />

0 Error<br />

1 Success<br />

Examples<br />

Tag Name<br />

TagResult<br />

Expression<br />

RunVBScript("MsgBox(Time)") // Executes the MsgBox function from VBScript and displays the current time.<br />

RunVBScript(TagStatement) // Executes the statement configured in the value of the string tag<br />

TagStatement.<br />

RunVBScript("$TagC=$TagA/$TagB", "TagError") // Writes in TagC the result of TagA divided<br />

by TagB. The error generated by the operation (if any) is written to the string tag TagError (e.g., "Division by zero").<br />

Tip: This function is useful to execute VBScript statements from interfaces that support the builtin<br />

language only (e.g., Scheduler groups). You can also call VBSCript functions created in the Global<br />

Procedures.<br />

Note: The runtime station must support the VBScript statements configured in this function in<br />

order to execute them.<br />

SecureViewerReload<br />

SecureViewerReload is a built-in scripting function that closes the Secure Viewer program and then reloads it<br />

with a new configuration file.<br />

Function Group Execution Windows Embedded Thin Client<br />

SecureViewerReload Module Activity Synchronous Not Supported Not Supported Secure Viewer only<br />

Page 616<br />

<strong>InduSoft</strong> Web Studio

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!