Forum Discussion

joe_2's avatar
joe_2
Contributor
11 years ago
Solved

How to test for the presence of a process, without generating an error if it is not there.

Need to test whether a given process is running without generating an error when it isn't. I have tried: If (Sys.Process("MyProcess").Exists = true) then... and If (Not Sys.Process("My...
  • Andrey_M's avatar
    11 years ago
    Hi Joseph.



    Use WaitProcess instead:



    If ( Sys.WaitProcess( "MyProcess", 1000 ).Exists ) then...



    1000 = waiting time in ms. If you don't need to wait your process to appear, just omit this parameter.