joe_2
11 years agoContributor
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("MyProcess") Is Nothing) then...
and
If object (Sys.Process("MyProcess")) Exists keywords
I keep getting "The process doesn't exist" errors.
Can't seem to find that magical way to test it without generating an error if it isn't there...
Anyone know a way?
VBScript or keyword will do.
I have tried:
If (Sys.Process("MyProcess").Exists = true) then...
and
If (Not Sys.Process("MyProcess") Is Nothing) then...
and
If object (Sys.Process("MyProcess")) Exists keywords
I keep getting "The process doesn't exist" errors.
Can't seem to find that magical way to test it without generating an error if it isn't there...
Anyone know a way?
VBScript or keyword will do.
- 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.