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 />

Notes<br />

Once this function is called, it remains active until the runtime project is stopped. That means every time the<br />

value of the tag changes, the procedure is executed.<br />

The procedure is executed on the Client. To execute a procedure on the Server, use the<br />

RunGlobalProcedureOnServer function.<br />

Examples<br />

When the value of TagTrigger changes, execute the procedure UsingTrigger:<br />

RunGlobalProcedureOnTrigger( "TagTrigger", "UsingTrigger" )<br />

RunGlobalProcedureOnTrue<br />

This function directly executes a global procedure when the value of a specified tag/expression becomes<br />

TRUE.<br />

Function Group Execution Windows Embedded Thin Client<br />

RunGlobalProcedureOnTrue<br />

Module Activity Synchronous Supported Supported Supported<br />

Syntax<br />

RunGlobalProcedureOnTrue("strCondition",strProcedureOnTrue)<br />

RunGlobalProcedureOnTrue( "strCondition", strProcedureOnTrue )<br />

strCondition<br />

A project tag or expression.<br />

strProcedureOnTrue<br />

Note: The tag name must be enclosed in quotes, as shown in the syntax<br />

diagram, or else the project will try to get the value of the named tag.<br />

The name of the procedure (i.e., a VBScript function or sub-routine defined in the Procedures<br />

folder) to run when the value of strCondition becomes TRUE (non-zero).<br />

Returned value<br />

This function returns the following possible values:<br />

Value<br />

Description<br />

0 Error<br />

1 Success<br />

Notes<br />

Once this function is called, it remains active until the runtime project is stopped. That means every time<br />

the tag/expression becomes TRUE, the procedure is executed. However, the procedure is executed only once<br />

when the tag/expression becomes TRUE; it is not continuously executed while the tag/expression is TRUE.<br />

The procedure is executed on the Client. To execute a procedure on the Server, use the<br />

RunGlobalProcedureOnServer function.<br />

<strong>InduSoft</strong> Web Studio Page 615

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

Saved successfully!

Ooh no, something went wrong!