omron — WinExec

Appendix: Built-in Scripting Language The command to be executed. optNumState The initial state of the program (if any) that is run by the command: This is an optional parameter. If no value is specified, then the default value is 1 . Note: This parameter is not supported on Windows Embedded target systems; regardless of what value is actually specified, the function is executed as if the default value is specified. optNumSync A setting that specifies whether the command will execute synchronously or asynchronously: This is an optional parameter. If no value is specified, then the default value is 0 . Tip:

To verify that a command executed asynchronously has finished, use the optTagReturnOrHandle parameter below and the WinExecIsRunning function. optTagReturnOrHandle The name of a project tag that will store feedback about the execution of the command: • If the command is executed asynchronously, then the tag will receive a handle that can used with the WinExecIsRunning function to determine whether the command is still running. • If the command is executed synchronously, then the tag will receive the command's exit code. (This is separate from the function's own returned value.) This is an optional parameter, but given its nature, there is no default value. Note:

The tag name must be enclosed in quotes, as shown in the syntax diagram, or else the project will try to get the value of the named tag. Returned value This function returns the following possible values: Please note that this indicates only whether the command started its execution successfully, particularly if it is executed asynchronously. It does not indicate when or how the command finished its execution. InduSoft Web Studio Page 519 Value Description 0 Hides the program and gives control to another one. 1 Activates and displays the program. 2 Activates the program and displays it as an icon. 3 Activates the program and maximizes it. 4 Shows the program at its recent size.

The program is still active. 7 Shows the program as an icon. The program is still active. Value Description 0 Execute asynchronously; the function will return immediately. 1 Execute synchronously; the function will return when the command has finished executing. Value Description 0 Command was not executed successfully. 1 Command was executed successfully.