The script below checks if word is running.
You should change the $pid= EnumProcess("WinWord.exe") part to the program you want to check for.

 Code:
Break on

$pid= EnumProcess("WinWord.exe")
If $pid <> ""
	?"MS Word is running"
Else
	?"MS Word is NOT running"
EndIf

Sleep 5

Function EnumProcess($exe, optional $terminate, optional $Computer)
	Dim $winmgmts, $ExecQuery, $Process, $id, $getobject, $
	If Not $computer	$computer=@wksta	EndIf
	$winmgmts="winmgmts:{impersonationLevel=impersonate}!//$COMPUTER"
	Select
		Case Val($exe)>0
			$ExecQuery="select * from Win32_Process where ProcessId='$exe'"
			$GetObject=GetObject($winmgmts).ExecQuery($ExecQuery)
			For Each $Process in $GetObject
				If $terminate		$=$Process.Terminate	EndIf
				$EnumProcess = $Process.name
				Next
			$GetObject=''
		Case VarType($exe)=8
			$ExecQuery="select * from Win32_Process where Name='$exe'"
			$GetObject=GetObject($winmgmts).ExecQuery($ExecQuery)
			For Each $Process in $GetObject
				If $terminate		$=$Process.Terminate	EndIf
				$id=$Process.ProcessId
				$EnumProcess = "$Id" + "|" + "$EnumProcess"
				Next
			$EnumProcess=Left($EnumProcess,Len($EnumProcess)-1)
			$GetObject=''
		Case 1
			Exit 1
		EndSelect
EndFunction
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.