8.10.4 GetExecStatus (get the execution status of an executable file)
- Purpose
-
Obtains the current execution status of an executable file called by the Exec or NetExec command (the Flag argument must be False).
- Syntax
GetExecStatus ([ExecId])
- Argument
-
- ExecId
-
Specify the ID of an executable file called by the Exec or NetExec command (the Flag argument must be False). Write the file ID as a character string or as a variable that stores the ID value. This ID is stored in the _EXEC_ID_ reserved variable at execution of the Exec or NetExec command.
This value is optional. If you omit this value, the value stored in the _EXEC_ID_ reserved variable is assumed.
- Description
-
The GetExecStatus command obtains the current execution status of an executable file called by the Exec or NetExec command (the Flag argument must be False). On successful execution, the command returns the execution status of the executable file. If an error occurs, a zero-length string ("") is returned.
Either of the following values is returned as the execution status:
Value
Meaning
EXEC_RUNNING
The executable file is executing.
EXEC_STOPPED
The executable file is not executing.
- Example
' After termination of processing of the executable file ' called by the Exec command (Flag argument False), start ' processing of the next Exec command. Dim exec1_ID prm1 = _SCF_+"Result.TXT" If Exec (_SCF_+"Sum.SPT", False, prm1) Then exec1_ID = _EXEC_ID_ ... End While GetExecStatus (exec1_ID) = EXEC_RUNNING Sleep (100) End While Exec (_WIN_+"NOTEPAD.EXE", True, prm1)
- JP1/Script version
-
Supported from JP1/Script 06-00.