KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Check if a process with specific name exists
PRODUCT: 4D | VERSION: 11.9 | PLATFORM: Mac & Win
Published On: September 2, 2011

Here is a simple method that can be used to check if a process with specific name exist.

  ` Method: DoesProcessExist
  ` Parameter:
  `  $1 - Process Name
  ` Return:
  `  $0 - True if exists

C_BOOLEAN($0)
C_TEXT($1;$process_name_t)
If(Count parameters>=1)
  $process_name_t:=$1
  $0:=(Process state(Process number($process_name_t))>=0)
End if