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

Syntax<br />

WinExec(strCommand{ | ,{ optNumState | 0 | 1 | 2 | 3 | 4 | 7 }{ | ,{ optNumSync | 0 | 1<br />

},"optTagReturnOrHandle" } })<br />

strCommand<br />

optNumState<br />

The command to be executed.<br />

The initial state of the program (if any) that is run by the command:<br />

Value<br />

Description<br />

optNumSync<br />

0 Hides the program and gives control to another one.<br />

1 Activates and displays the program.<br />

2 Activates the program and displays it as an icon.<br />

3 Activates the program and maximizes it.<br />

4 Shows the program at its recent size. The program is still active.<br />

7 Shows the program as an icon. The program is still active.<br />

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

Note: This parameter is not supported on Windows Embedded target systems;<br />

regardless of what value is actually specified, the function is executed as if the<br />

default value is specified.<br />

A setting that specifies whether the command will execute synchronously or asynchronously:<br />

Value<br />

Description<br />

0 Execute asynchronously; the function will return immediately.<br />

1 Execute synchronously; the function will return when the command<br />

has finished executing.<br />

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

optTagReturnOrHandle<br />

Tip: To verify that a command executed asynchronously has finished, use the<br />

optTagReturnOrHandle parameter below and the WinExecIsRunning function.<br />

The name of a project tag that will store feedback about the execution of the command:<br />

• If the command is executed asynchronously, then the tag will receive a handle that can used<br />

with the WinExecIsRunning function to determine whether the command is still running.<br />

• If the command is executed synchronously, then the tag will receive the command's exit<br />

code. (This is separate from the function's own returned value.)<br />

This is an optional parameter, but given its nature, there is no default value.<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 />

Returned value<br />

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

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

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

Saved successfully!

Ooh no, something went wrong!