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.

Determine current screen (e.g. TV Guide) of WMC (ehome)?

If you have a question or need help, this is the place to be.
Post Reply
bennynihon
Posts: 5
Joined: Wed Apr 09, 2014 4:16 pm

Determine current screen (e.g. TV Guide) of WMC (ehome)?

Post by bennynihon »

Currently I use XBMC as a media frontend on my PC and Windows Media Center for Live TV. I launch WMC from XBMC which I have set to go directly to the Live TV Guide of WMC. When I am watching a show, pressing the back button on my remote (through EventGhost) returns to the TV Guide. Pressing it again brings me out of the TV Guide and to the WMC main screen. What I'd like to be able to accomplish is detecting that I am on the TV Guide screen so when I press the back button from there, it will return to XBMC. Since it's all part of the same program (eshell.exe), I'm not sure how I'd easily be able to detect if I'm on the TV Guide screen as opposed to an actual TV program, or any other screen within WMC for that matter. Thanks for any suggestions!
Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Determine current screen (e.g. TV Guide) of WMC (ehome)?

Post by Dragon470 »

What you need is the vmccontroller (vista media center controller) plugin for both wmc http://vmccontroller.codeplex.com/ and eventghost viewtopic.php?f=9&t=911&hilit=vmccontroller. I have also modified the eventghost plugin (renamed WMCController) http://www.eventghost.org/forum/viewtop ... ffa#p28387 so it only needs one instance for multiple pc and extenders. You can use either plugin for eventghost as they are basically the same. I will send an event on what screen is on.
bennynihon
Posts: 5
Joined: Wed Apr 09, 2014 4:16 pm

Re: Determine current screen (e.g. TV Guide) of WMC (ehome)?

Post by bennynihon »

thanks. that looks promising. This may actually come in handy for displaying WMC status on the VFD of my PC. So I suppose there's no way to grab text from the WMC window (presumably because it's using a fullscreen directdraw type display)? Or even a registry entry that may have the current screen being shown within WMC? Since I won't be using WMC Controller to actually be controlling WMC and just for status, I want to make sure there's not a more straightforward way that involves less moving parts. Thanks.
bennynihon
Posts: 5
Joined: Wed Apr 09, 2014 4:16 pm

Re: Determine current screen (e.g. TV Guide) of WMC (ehome)?

Post by bennynihon »

OK, I've got it all setup. Looks nice. I can send commands no problem using your plugin. But how do I go about reading status messages? You mention something about using the Network Event Receiver, but it's unclear how I'd go about setting this up to receive messages from WMC Controller. Thanks!
Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Determine current screen (e.g. TV Guide) of WMC (ehome)?

Post by Dragon470 »

In the plugin configuration there is an option to generate events.

The events will output to the screen as: ******.FS_Home 'True'

This one means that it is on the home screen. There are many others ex. FS_Videos, FS_RecordedTV, FS_Guide

You can use this to activate or deactivate what commands are issued when you press your Back button on your remote.


Note: There are times when I have noticed that it doesn't update all the time with the correct location.

That was why I made the GetInfo action that you can use to get the location. The result from the command is stored in the variable eg.result. So right after the GetInfo just use a script to do what you need.
bennynihon
Posts: 5
Joined: Wed Apr 09, 2014 4:16 pm

Re: Determine current screen (e.g. TV Guide) of WMC (ehome)?

Post by bennynihon »

Dragon470 wrote:In the plugin configuration there is an option to generate events.

The events will output to the screen as: ******.FS_Home 'True'

This one means that it is on the home screen. There are many others ex. FS_Videos, FS_RecordedTV, FS_Guide

You can use this to activate or deactivate what commands are issued when you press your Back button on your remote.


Note: There are times when I have noticed that it doesn't update all the time with the correct location.

That was why I made the GetInfo action that you can use to get the location. The result from the command is stored in the variable eg.result. So right after the GetInfo just use a script to do what you need.
Hmm. The only actions I see under WMC Controller are SendStock, Send, and Connect. I don't see GetInfo. Nor do I see an option to generate events in the plugin configuration. I do see that you can specify an event generation prefix which is set at WMC-PC. It's unclear what I'd do beyond that to get the event generation to work. I tried adding the Network Event Receiver plugin and matching event prefixes, but that was just a stab in the dark. I do see this message when I start EventGhost " WMC-PC.Status Session Closed '127.0.0.1:40400' ". Not sure if that gives any clues as to why I'm not seeing any events. I appreciate your help. Thanks!
Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Determine current screen (e.g. TV Guide) of WMC (ehome)?

Post by Dragon470 »

Sorry, that I didn't update the plugin in the forums (no wonder you were confused). I just updated the wmcController plugin forum with the newest version.

Media center will have to be running, then you will get an event like this:

7MCZagam.Status Session Connected '192.168.1.111:40400'
and
7MCZagam.204 Connected '(Build: 1.0.0 Clients: 2)'
bennynihon
Posts: 5
Joined: Wed Apr 09, 2014 4:16 pm

Re: Determine current screen (e.g. TV Guide) of WMC (ehome)?

Post by bennynihon »

awesome! you just made my night. thanks again for all the work you put into a great plugin.
Post Reply