by
GasMan » Thu Sep 27, 2007 9:04 am
Sergio,
Do you have the following information about the ExecWait command.
Executes the specified program.
Group
Application Control commands
Syntax
ExecNoWait Program_Specification, [Appearance], [InputFileNum] ,[OutputFileNum] ,[ErrorFileNum]
ExecNoWait( Program_Specification, [Appearance], [InputFileNum] ,[OutputFileNum] ,[ErrorFileNum] )
ExecWait Program_Specification, [Appearance], [InputFileNum] ,[OutputFileNum] ,[ErrorFileNum]
ExecWait( Program_Specification, [Appearance], [InputFileNum] ,[OutputFileNum] ,[ErrorFileNum] )
Parameters Type/Description
Program_Specification String expression identifying a program and its parameters.
Appearance Numerical expression evaluating into an integer
InputFileNum File number. Given file is used as input file of the program being executed.
OutputFileNum File number. Given file is used as output file of the program being executed.
ErrorFileNum File number. Given file is used as error file of the program being executed.
Discussion
ExecNoWait and ExecWait are available as commands and functions. They execute the specified program. When using ExecNoWait, the CP does not wait for the program to finish before executing its next command. ExecWait returns the program's return value, while ExecNoWait returns the task id of the application if it actually starts.
An application name without absolute path is specified from the applications current working directory.
Appearance controls the display behavior on the graphical user interface for the started program. The number has the following meaning:
1 = normal sized window
2 = icon
3 = maximum sized window
If number is omitted it defaults to 2.
By providing file descriptors for the program to read its input from InputFileNum, write its output to OutputFileNum and finally writes its errors to ErrorFileNum, the macro writer has more control over the program being executed by ExecWait/ExecNoWait.
The use of the file descriptor parameters InputFileNum, OutputFileNum and ErrorFileNum is only possible when staring DOS programs. It is not valid when starting MS-WINDOWS applications.
For backwards compatibility for previous versions the function Exec() is available, but usage of ExecNoWait() function is suggested.
ExecNoWait() is typically used before DDEInitiate to start a DDE conversation with an particular instance of an application.
Return Value
Number (if called as a function)
Copyright (c) 1990-2002 Agilent Technologies
It is normally used to call an executable program. Please not that to pass parameters, the program must be a DOS program, not a MS Windows program.
Gasman