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
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

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