Hello,
How I can detect when a process exits? The process doesn't have any windows Task.Destroyed isn't an option (afaik).
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
How to detect process exit?
Re: How to detect process exit?
There is a checkbox in the "start application" action to wait for the specified program to finish before continuing. However using that feature will block EG from processing events while it's waiting.
If you wanted to you could also work around the problem with a small batch file. The following command will wait for someprogram.exe to finish before the second statement (which in this case triggers an event in EG).
or if you want to launch directly from eg (with start application action) or a windows shortcut.
Yes, it's ugly, but this kind of approach should work just fine for batch commands that just take a while to run.
-jinxdone
If you wanted to you could also work around the problem with a small batch file. The following command will wait for someprogram.exe to finish before the second statement (which in this case triggers an event in EG).
Code: Select all
start /wait someprgorgam.exe && "c:\Program Files\EventGhost\EventGhost.exe" -e ProgramFinishedCode: Select all
cmd.exe /c start /wait someprgorgam.exe && "c:\Program Files\EventGhost\EventGhost.exe" -e ProgramFinished-jinxdone
-
HaliburtonZeke
- Posts: 1
- Joined: Wed Jan 11, 2012 4:49 pm
Re: How to detect process exit?
Win7 . This batch job starts EventGhost which starts MediaMonkey. Everything runs fine but when I close MM, the cmd window closes but EG doesn't close. I'm stuck. What am I doing wrong? Here's my batch job.
cd C:\Program Files (x86)\
Start EventGhost\EventGhost.exe -hide -configdir N:\Program Info\EventGhost for MediaMonkey
cd C:\
start /wait "" "C:\Program Files (x86)\MediaMonkey\Mediamonkey.exe" && "C:\Program Files (x86)\EventGhost\EventGhost.exe" -e ProgramFinished
cls
exit
cd C:\Program Files (x86)\
Start EventGhost\EventGhost.exe -hide -configdir N:\Program Info\EventGhost for MediaMonkey
cd C:\
start /wait "" "C:\Program Files (x86)\MediaMonkey\Mediamonkey.exe" && "C:\Program Files (x86)\EventGhost\EventGhost.exe" -e ProgramFinished
cls
exit
Re: How to detect process exit?
Is there a way to not only look at a process, but look at what the title bar says?