hi. i've been using event ghost for some time and i'm having some trouble.
as i use eventghost on a HTPC as the windows shell, i've configured a macro that automatically restarts XBMC if it crashes, using process watcher (Process.Destroyed.XBMC -> run program XBMC.exe)
what i want to do is to disable that macro if steam is running.
so if steam is running, kill xbmc. and if steam is closed, run xbmc again. but if i put, said macro, the one mentioned before will fire up and reopen xbmc.
any way to disable the macro if another macro is active and reenable it after closing?
thanks for answering
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.
Help: disable macro if a condition is meet.
Re: Help: disable macro if a condition is meet.
Here is a little script you can use:
just replace notepad.exe with steam.exe or whatever it is. This will stop the macro if it finds the specified program.
Code: Select all
from eg.cFunctions import GetProcessDict
newProcesses = GetProcessDict()
for x in newProcesses:
if "notepad.exe" == str(newProcesses[x]):
print "Process found, now stopping script"
eg.StopMacro()Re: Help: disable macro if a condition is meet.
Depending on the specifics of what you're trying to do, you may also want to look at an example that comes with the default .xml file for EG: Under Other Examples -> State Macro Example. Each macro enables or disables another macro depending on the status of something. There's also a second example.
Re: Help: disable macro if a condition is meet.
Dragon470 wrote:Here is a little script you can use:
just replace notepad.exe with steam.exe or whatever it is. This will stop the macro if it finds the specified program.Code: Select all
from eg.cFunctions import GetProcessDict newProcesses = GetProcessDict() for x in newProcesses: if "notepad.exe" == str(newProcesses[x]): print "Process found, now stopping script" eg.StopMacro()
took me a while to figure out that this script was case-sensitive, but this worked flawlessly. thanks for your help.
this is awesome!. i had no idea eventghost could do that. will try to experiment on that.kkl wrote:Depending on the specifics of what you're trying to do, you may also want to look at an example that comes with the default .xml file for EG: Under Other Examples -> State Macro Example. Each macro enables or disables another macro depending on the status of something. There's also a second example.
i mainly use EventGhost as a replacement for the windows shell and as a launcher of startup/crash-recovery of media center apps. so my configuration is very simple at the moment: some server apps on autostart, a macro to restart crashed apps and another for killing an app is another app is launching and restoring it if it closes.