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

Value Command Description<br />

9 SW_RESTORE Activates and displays the specified window.<br />

If the window is minimized or maximized,<br />

then it is restored to its original size and<br />

position.<br />

You should use this command when<br />

restoring a minimized window.<br />

This is an optional parameter. If no value is specified, then the default command is SW_RESTORE.<br />

optNumTimeout<br />

The timeout period (in milliseconds) for the function to be successfully executed. If, for whatever<br />

reason, the function is not executed in this period, then it is aborted.<br />

This is an optional parameter. If no value is specified, then the default timeout is five seconds<br />

(or 5000 milliseconds).<br />

Returned value<br />

This function will return one of the following values:<br />

Value<br />

Description<br />

0 ERROR: The specified application window was not activated or otherwise did<br />

not respond within the timeout period.<br />

1 SUCCESS: The specified application window was successfully activated.<br />

Notes<br />

AppActivate is similar to the function ShowWindow in the Microsoft Windows API, and it allows many of the<br />

same options. For more information, please refer to the Windows API documentation.<br />

Examples<br />

Show the Microsoft Word document named test.doc:<br />

AppActivate( "test.doc — Microsoft Word", 5 )<br />

AppIsRunning<br />

AppIsRunning is a built-in scripting function that verifies another application window is open and running.<br />

Function Group Execution Windows Embedded Thin Client<br />

AppIsRunning Module Activity Synchronous Supported Supported Supported<br />

Syntax<br />

AppIsRunning(strAppTitle{ | ,optNumTimeout })<br />

strAppTitle<br />

The full title (as shown in the title bar) of the application window.<br />

optNumTimeout<br />

The timeout period (in milliseconds) for the function to be successfully executed. If, for whatever<br />

reason, the function is not executed in this period, then it is aborted.<br />

This is an optional parameter. If no value is specified, then the default timeout is five seconds<br />

(or 5000 milliseconds).<br />

Returned value<br />

This function will return one of the following values:<br />

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

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

Saved successfully!

Ooh no, something went wrong!