Process ENUMERATE - < process_enum >() ... [Pro]
Process ENUMERATE <process_enum>("Variable array for names","Variable array size","Variable array for process Id's") Available in: Professional edition
|
This command enumerates all running processes.
|
#
|
Parameter name
|
Parameter description
|
1
|
Variable array for names
|
Variable (array) that receives names of running processes.
|
2
|
Variable array size
|
Variable that receives number of process.
|
3
|
Variable array for process Id's
|
Variable (array) that receives Ids of running processes.
|
|
|
Example (Macro Steps):
|
1
|
<#> <#> This example enumerates running processes and lists them in Notepad
|
2
|
<#> <#>
|
3
|
Macro execution: ONLY COMMANDS
|
4
|
Process ENUMERATE Variable array for names=vProcess, Variable array size=vNumOfProcesses
|
5
|
Run APPLICATION "notepad.exe" (other parameters: Parameters = , Folder path = , Window state = Normal). Macro execution waits for application to finish up to "0" seconds.
|
6
|
WAIT FOR Object = "WIN", Event = "ACT", Parameter = "Notepad", Timeout (seconds) = "5", Exact = "0"
|
7
|
IF WINDOW "Notepad" Is Active (Match=Partial)
|
8
|
Macro execution: KEYS / FREE TEXT + COMMANDS
|
9
|
These processes are running #. [ name ;30 [ \Device\HarddiskVolume3\Program Files (x86)\iPass\Open Mobile\omsi\iPlatformService.exe ; 1772 ] Id ]:
|
10
|
Keyboard Insert NEW LINE
|
11
|
Keyboard Insert NEW LINE
|
12
|
Macro execution: ONLY COMMANDS
|
13
|
Loop BEGIN Repeat = vNumOfProcesses
|
14
|
Variable INSERT to active application "%_vLoopCounter% [ %vProcess[_vLoopCounter0]% ; %vProcessIds[_vLoopCounter0]% ]", Text insertion method="Default (as defined in settings)"
|
15
|
Macro execution: KEYS / FREE TEXT + COMMANDS
|
16
|
Keyboard Insert NEW LINE
|
17
|
Macro execution: ONLY COMMANDS
|
18
|
Loop END
|
19
|
ENDIF
|
|
Example (Plain Text):
<#> This example enumerates running processes and lists them in Notepad
<#>
<cmds>
<process_enum>("vProcess","vNumOfProcesses","vProcessIds")
<execappex>("notepad.exe","","",0,0)
<waitfor>("WIN","ACT","Notepad",5,0)
<if_win>("Notepad","ACT",0)
<keys>These processes are running #. [ name ;30 [ \Device\HarddiskVolume3\Program Files (x86)\iPass\Open Mobile\omsi\iPlatformService.exe ; 1772 ] Id ]:<newline><#>
<newline><#>
<cmds>
<begloop>(vNumOfProcesses)
<varout>("%_vLoopCounter% [ %vProcess[_vLoopCounter0]% ; %vProcessIds[_vLoopCounter0]% ]","0")<#>
<keys><#>
<newline><#>
<cmds>
<endloop>
<endif>