Originally Posted by scooner
How do you setup the Eventghost macro to find the Media Center window and close it? I know how to set it up to close the current window, but not specifically Media Center.
That's the primary reason I do it this way (i.e. so I can close media center even if it is not in the foreground).
The first thing I did with Eventghost is remove all the stuff that comes in a default installation, like the stuff to control ZoomPlayer and emulate keyboard strokes. If all you're doing is starting/closing apps, you don't need any of that.
You create a Macro (I called mine 'Close Media Center'). Inside that macro are 3 things, 1 'Event' and 2 'Actions'. The first action is a 'Find Window' action (when you add an action, to a macro, it brings a list of different ones you can pick. Find Window is one of them). Find Window can find a window a bunch of different ways. It can look for the name of the executable running, the title of the window and a few other things. When you add the Find Window action, you can drag this little cursor thingy over to your media center window and it will set it all up for you. After that, I have a 'Close' action. The Close action just closes whatever Find Window found (you can set Find Window up to terminate the macro if it doesn't find the window you're looking for).
The Event you put in there would be the Event that occurs when you press a certain button on your remote. You could also do something like put in a 'Sleep' event so it shuts down when the computer goes to sleep, if you wanted that. The only other thing you would have to make sure is that the macro is enabled all the time. I put it in a folder of macros and have an 'Enable: my macros' action happen on eventghost startup.
It works pretty good. I only just recently switched to Media Center, so I've only been doing this for a couple of weeks with it, but I used a very similar setup with my own frontend for over a year with no troubles.
Setting this up sounds more complicated than it really is. Eventghost is pretty easy to use once you get the hang of it. Just remember to keep everything as simple as possible. It's easy to overly complicate your eventghost setup and cause problems.