[Tutorial] Creating a button to open and close XBMC using eventghost
#1
Got to admit, I couldn't find if this existed elsewhere but I have invented a method to create a button on your remote to open and close XBMC.

This guide assumes you are familiar with the basic concept of eventghost.

1. In the main configuration tree create a macro called 'Start XBMC'
2. Add an action to 'start an application' and point this towards xbmc (or any other program you'd like to start and stop on a button)
3. Add an action to 'disable an item' and point this towards the 'Start XBMC' macro
4. In the main configuration tree create a macro called 'Stop XBMC'
5. Add an action to 'Quit XBMC' to this macro
6. Add an action to 'disable an item' and point this towards the 'Stop XBMC' macro
7. Add an action to 'enable an item' and point this towards the 'Start XBMC' macro
8. Add an additional action to the 'Start XBMC' macro to 'enable an item' and point this towards the 'Stop XBMC' macro
9. Press the button on your remote that you would like to assign to the starting and stopping of you application and drag this from the log into both the 'Start XBMC' macro and the 'Stop XBMC' macro
10. Right click on the 'Stop XBMC' macro and click disable


The end result should appear like this

Image

Now when you press the assigned button XBMC starts and the 'Start XBMC' disables itself and the 'Stop XBMC' is enabled. This means that the next time you press the button XBMC closes and the 'Stop XBMC' disables itself and the 'Start XBMC' macro is enabled, the loop then continues.

MINOR BUG: If you press the assigned button for a second time before XBMC has fully loaded then it will take 2 presses of the button to quit.

With some adaptation this can be used to switch between two programs, eg media portal.

If you have any questions feel free to ask.

Please note I am a complete noob to xbmc and eventghost and just worked this out during my first ever istallation.
Reply
#2
very handy!

i had been trying to figure something similar out to quit/restart xbmc after resuming from standby/suspend gave me intermittent audio issues (requiring a close & re-opening of xbmc - or reboot)

thanks
Reply
#3
Thanks! After playing with this for a while, I decided having the enable/disable part wasn't necessary. XBMC can't start more than one session at a time anyways so I just did this and it works great:

Image
Reply
#4
check out post #8 http://forum.xbmc.org/showthread.php?tid=43361

for all dualscreen users Wink
Reply

Logout Mark Read Team Forum Stats Members Help
[Tutorial] Creating a button to open and close XBMC using eventghost0