How do I setup a key that will launch an application and exit it as well? Example: I press the "DVD" key to start Zoom Player. If I press the same key while in Zoom Player, it will exit the application.
Thanks
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.
Using Same Key to Start & Exit An Application
If pressing the DVD key is the only way you start ZP you can enable a close macro in the start macro and disable the start action. You have to use the "Stop processing this event" action in each of the macros. Otherwise both will run in circle.
The other way is to switch between the two macros with the task plugin, as it will give you events when an application is started or closed.
The other way is to switch between the two macros with the task plugin, as it will give you events when an application is started or closed.
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
And the third way is to use the FindWindow action. A layout like this:
Macro: Launch/Exit Zoom Player
Event: DVD
- Find Window: some window from ZP
- Jump: If successful to "Exit Zoom Player" and don't return
- Start Application: Zoom Player
Macro: Exit Zoom Player
- Zoom Player: Exit
This will even do the right thing if ZP was not started by EG.
Macro: Launch/Exit Zoom Player
Event: DVD
- Find Window: some window from ZP
- Jump: If successful to "Exit Zoom Player" and don't return
- Start Application: Zoom Player
Macro: Exit Zoom Player
- Zoom Player: Exit
This will even do the right thing if ZP was not started by EG.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!