Description |
Loops through the filenames of the processes (applications) that are currently running on the system. The variable specified is updated with the process filename. With each successive loop, the next process filename is retrieved. The loop ends after all the process filenames have been retrieved or when a Break is encountered. |
Declaration |
<AMLOOP TYPE="PROCESSES" RESULTVARIABLE="text"
[variablename]" KEEPPATHS="yes/no" INCLUDE="text"
EXCLUDE="text" SORT="text[options] "RESULTDATASET="text"> |
Example |
<!-- Closes all Notepad processes --> <AMVARIABLE NAME="currentprocess"></AMVARIABLE> <AMLOOP TYPE="PROCESSES" RESULTVARIABLE="currentprocess" INCLUDE="*notepad.exe" RESULTDATASET="ProcessDataset"> <AMENDPROCESS PROCESS="%currentprocess%" /> </AMLOOP> |
General Tab Parameters |
Populate variable with process name: Specifies an already created variable name that should be populated with the next process name on each successive loop. The variable must be created in an earlier step using the Create Variable action. Text, Required Do not include path information: Specifies that the folder path should be removed from the return value so that a filename only (the process name) is returned. Yes/No, Optional, Default: No Create and populate dataset with extended process information: Specifies the name of a dataset to be created and populated with process data. In addition to the standard dataset fields, the dataset will contain the following:
Text, Optional |
Advanced Tab Parameters |
Include processes: Specifies the wildcard mask that should be included in the loop. For example, if *notepad.exe was specified, the loop would only include processes with the name notepad.exe, in other words, all open instances of Notepad regardless of the folder they were launched from or whether or not they were displayed. Standard wildcard characters * and ? are allowed. Text, Optional, Default: {blank Exclude processes: Specifies the wildcard mask that should be excluded from the loop. For example, if *notepad.exe was specified, the loop would exclude all processes with the name notepad.exe. Standard wildcard characters * and ? are allowed. Text, Optional, Default: {blank Output List: Specifies whether a sort order should be applied to the values before the loop begins. For example, selecting "ascending" would return the process names in alphabetical order.
Text [options], Optional, Default: "none" |