18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix: Built-in Scripting Language<br />

Syntax<br />

RunGlobalProcedureOnFalse("strCondition",strProcedureOnFalse)<br />

RunGlobalProcedureOnFalse( "strCondition", strProcedureOnFalse )<br />

strCondition<br />

A project tag or expression.<br />

strProcedureOnFalse<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 FALSE (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 the<br />

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

when the tag/expression becomes FALSE; it is not continuously executed while the tag/expression is FALSE.<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 TagOnFalse becomes FALSE (zero), execute the procedure UsingOnFalse:<br />

RunGlobalProcedureOnFalse( "TagOnFalse", "UsingOnFalse" )<br />

RunGlobalProcedureOnServer<br />

This function directly executes a global procedure with parameters. The procedure is run on the project<br />

server, but it can be called by any local or remote client.<br />

Function Group Execution Windows Embedded Thin Client<br />

RunGlobalProcedureOnServer<br />

Module Activity Synchronous Supported Supported Supported<br />

Syntax<br />

RunGlobalProcedureOnServer(strProcedureName{ | ,optStrArgument1,…,optStrArgumentN })<br />

RunGlobalProcedureOnServer( strProcedureName, optStrArgument1, …, optStrArgumentN )<br />

strProcedureName<br />

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

folder) to run on the server.<br />

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

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

Saved successfully!

Ooh no, something went wrong!