In case it helps.. Adding documentation

' sets the environment
Set WshShell = WScript.CreateObject ("WScript.Shell")

'grabs the full processlist and puts it in a var
Set colProcessList = GetObject("Winmgmts:").ExecQuery ("Select * from
Win32_Process")


'loops through each looking for a match
For Each objProcess in colProcessList
If objProcess.name = "firefox.exe" then

'sets a flag if a match is found
vFound = True
End if

'next loop of course
Next

'if a match was found, activate the app
If vFound = True then
WshShell.AppActivate "firefox"
Else

' otherwise, run the app
WshShell.Run "firefox.exe"
End If
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to