Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
End process, find out, if process is running?
#1
hello,
can I end any process or any program, which is not visible?
example: I run some program, to do some little thing, and after that, the program window is closed, but the program itself remains in system tray. I want to close this program completly, that means, its process. rigt click the icon in systemtray and click menĂ¼ "exit program xxx" does not work properly.

can I find out, if there is any process running?
example: open some internetlink in opera, if opera is running (and internetexplorer is not running), but open the link in internetexplorer, if opera is not running, but internetexplorer is running at that time.
generally I would like qm to check, if process is running.

thanks
hasi
#2
Code:
Copy      Help
int pid=ProcessNameToId2("notepad" 0 1)
if(pid)
,if(mes("Notepad is running. Terminate it?" "" "YN?"))
,,ShutDownProcess pid 1
else
,if(mes("Notepad is NOT running. Run it?" "" "YN?"))
,,run "notepad"

Terminating a process is not recommended. Do it only if you don't have other choices.
#3
thanks, that works very well (good?)! Big Grin


Forum Jump:


Users browsing this thread: 1 Guest(s)