Check if a Process is Running
Loop through all processes and check if a certain process is running
This task will loop through all processes and check if a certain process is running. If so, a dialog box will display YES! <Process Name> is running. This demonstrates how the 'Loop Processes' action can be utilized.
First, a variable named whatsrunning is created which will later hold the value of the process name. Next, a 'Loop Processes' action is created. This action loops through the filenames of the processes (applications) that are currently running on the system. The variable named whatsrunning specified in the Index parameter 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.
An 'If 'statement is then used to check for a certain process name running. In this case, it checks to see if "C:\Program Files\AutoMate 6\AMTB.exe" is currently running. A message box will be displayed if the specified process is currently running.