Causes task execution to pause at the current line until the specified process starts or ends. Commonly used to wait for an external application to start or end which could indicate that a process has completed successfully. If the process started/ended then the task could move on.
Declaration
<AMWAITFORPROCESS PROCESS="text" RESULTDATASET="text" />
Example Task 1 - Wait for Internet Explorer process to start.
<AMWAITFORPROCESS PROCESS="C:\Program Files (x86)\Internet Explorer\iexplore.exe" RESULTDATASET="theDataset" />
Example 2 - Wait for Internet Explorer process to end.
<AMWAITFORPROCESS ACTION="end" PROCESS="C:\Program Files (x86)\Internet Explorer\iexplore.exe" RESULTDATASET="theDataset" />
See Also: Wait for File
Property |
Type |
Required |
Default |
Markup |
Description |
Action |
Text (options) |
Yes |
Match |
ACTION="start" |
Specifies whether the step should wait for the process to start or end. The available options are:
|
Use Process Name |
Text |
No |
(Empty) |
a)PROCESS="c:\folder\iexplore.exe" b)PROCESS="iexplore.exe" |
the executable of the process that AWE should wait for. Partial matches are allowed (either the full path or the EXE name only may be specified). NOTE: The process may be specified either by process name or by process ID— see below. |
Use Process ID |
Number |
No |
(Empty) |
PROCESSID="3932" |
The process ID of the process that AWE should wait for. NOTE: The process may be specified either by process name or by process ID. |
Create and populate dataset |
Text |
No |
(Empty) |
RESULTDATASET="DatasetName" |
The name of a dataset to be created and populated with process data. More on the fields that this dataset creates can be found below. |
The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.
More on setting custom step description
The Error Causes tab allows you to select/omit specific errors that should cause a particular step to fail.
More on Error Causes properties
The On Error tab allows you to determine what the task should do if a particular step encounters an error.
More about On Error properties
A dataset is a multiple column, multiple row container object. This activity creates and populates a dataset containing a specific set of fields in addition to the standard dataset fields. The table below describes these fields (assuming the dataset name assigned was theDataset).
Name |
Type |
Return Value |
theDataset.ProcessName |
Text |
Returns the path and file name of the process's.exe file. |
theDataset.ProcessID |
Number |
Returns the ID of the process. |
theDataset.WindowTitle |
Text |
Returns the title of the process's main window. |
theDataset.WindowClass |
Text |
Returns the class of the process's main window. |
theDataset.WindowHandle |
Number |
Returns the handle of the process's main window. |
All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, % Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.