Everything you are trying to do can be done with native actions, no bat files or process killing needed.
Use Start Program with command line options
- using a .bat file is not necessary, and is why you see popup windows
Use the Find Window then Close action to close a program. No need to worry about IF it exists - it is not needed.
- if you find, for some reason you must kill the process (again, this should not be necessary in most cases) you should use python code...
- Code: Select all
os.system("taskkill /im <YOUR EXE GOES HERE> /f")
One suggestion... Trigger actions that close apps automatically when other ones open, thus when EG sees the app launching.
Simple Example Macro, macro items bolded --- with comments to explain...Task.Activated.APP1
--- event "detects" when APP1 starts, which triggers the macro to runTrigger event "APP2.close"
--- starts macro to close the other app(s), you can do the Find Window / Close here without a separate macro but I prefer separate macros, makes it easier to expand/change laterEnable exclusive: APP1 controls
--- look up this function, it allows easy switching of what has control, and receives IR, keystrokes, etc
hope this helps
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system