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.

Windows Media Center (MCE) - Beta

Questions and comments specific to a particular plugin should go here.
itauditor
Posts: 6
Joined: Tue May 31, 2011 9:51 am

Re: Windows Media Center (MCE) - Beta

Post by itauditor »

That did it ! Fantastic!

thanks a bunch
lappen

Re: Windows Media Center (MCE) - Beta

Post by lappen »

Hi

Im' trying to use the start or home event/action but they won't work unless mce is started. I thought they were used to start MCE? If not any suggestions on how to start MCE through eventghost?

See log in scrshot
Image

Uploaded with ImageShack.us
roleyrev
Posts: 3
Joined: Mon Sep 05, 2011 5:11 am

Re: Windows Media Center (MCE) - Beta

Post by roleyrev »

Hi Check out:

http://windows.microsoft.com/en-US/wind ... -shortcuts

Use the EG window control macro to emulate the key sequience to start MCE:

Windows Key+ALT+ENTER

that should do the trick

Cheers

John
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: Windows Media Center (MCE) - Beta

Post by Livin »

simple... All you need to do is launch C:\Windows\ehome\ehshell.exe

there are all sort of command line options too...

http://msdn.microsoft.com/en-us/library ... 89052.aspx

I always skip the animation and go directly to the either Recorded Shows or TV Guide depending on what remote button I press. Very useful!
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
barnabas1969
Experienced User
Posts: 133
Joined: Sat Feb 04, 2012 1:42 am

Re: Windows Media Center (MCE) - Beta

Post by barnabas1969 »

After installing the MCE Remote plugin for Vista/7 (see here), and the associated background service, I found it easier to just add the HID registry keys back into the registry. This makes the remote control send commands to Media Center just like it did before I installed EG... plus, EG gets the events from the button presses so I can trigger macros. Adding the HID registry keys back into the registry makes the plugin being discussed in this thread unnecessary.

In other words, when you add the HID registry keys back into the registry, the EG plugin for MCE Remote (Vista/7) no longer prevents those IR commands from being sent to Media Center.

The reason I wanted to use the MCE remote plugin for Vista/7 was so that I could use the MCE IR dongle to detect key presses from any remote, not just the MCE remote. For example, I can program my remote to send an IR code from a component that I don't even own and then use that IR code in EG to trigger a macro. I have buttons defined on my remote's touch-screen that go directly to Netflix, Hulu, MCE Sleep Timer, etc. There are no keyboard shortcuts for these in Media Center. What I did was I used a "PC Remote" (not the MCE remote) commands for F1, F2, F3, etc. Media Center ignores these commands... but EG sees them and runs the command-line for ehome.exe to navigate directly to Netflix, runs the HuluWatcher.exe for Hulu, and stuff like that.

Doing it my way (adding the HID registry keys back into the registry) also gives me back the fast-scroll feature in Media Center. For example, if you use this MCE plugin to send the keyboard key <Right-Arrow> to Media Center, even if you have it set to repeat the button... Media Center will never fast-scroll through the guide. This is because Media Center needs to detect that you are holding down the button in order to start fast-scroll.
Misugi
Posts: 1
Joined: Sat Jul 14, 2012 11:37 am

Re: Windows Media Center (MCE) - Beta

Post by Misugi »

To fix the problem of the action "MCE: Start", personally I have just modify the code in the file "plugins\MCE\__init__.py" as bellow :

Code: Select all

    def __call__(self):
        if self.value > '{Win+':
            eg.SendKeys(None, self.value, False)
        else:
            hwnds = FindMCE()
            if len(hwnds) != 0:
                eg.SendKeys(hwnds[0], self.value, False)
            else:
                self.PrintError("MCE is not running")
                return
muzicman0
Posts: 9
Joined: Tue Jul 24, 2012 8:14 pm

Re: Windows Media Center (MCE) - Beta

Post by muzicman0 »

barnabas1969 wrote:After installing the MCE Remote plugin for Vista/7 (see here), and the associated background service, I found it easier to just add the HID registry keys back into the registry. This makes the remote control send commands to Media Center just like it did before I installed EG... plus, EG gets the events from the button presses so I can trigger macros. Adding the HID registry keys back into the registry makes the plugin being discussed in this thread unnecessary.

In other words, when you add the HID registry keys back into the registry, the EG plugin for MCE Remote (Vista/7) no longer prevents those IR commands from being sent to Media Center.

The reason I wanted to use the MCE remote plugin for Vista/7 was so that I could use the MCE IR dongle to detect key presses from any remote, not just the MCE remote. For example, I can program my remote to send an IR code from a component that I don't even own and then use that IR code in EG to trigger a macro. I have buttons defined on my remote's touch-screen that go directly to Netflix, Hulu, MCE Sleep Timer, etc. There are no keyboard shortcuts for these in Media Center. What I did was I used a "PC Remote" (not the MCE remote) commands for F1, F2, F3, etc. Media Center ignores these commands... but EG sees them and runs the command-line for ehome.exe to navigate directly to Netflix, runs the HuluWatcher.exe for Hulu, and stuff like that.

Doing it my way (adding the HID registry keys back into the registry) also gives me back the fast-scroll feature in Media Center. For example, if you use this MCE plugin to send the keyboard key <Right-Arrow> to Media Center, even if you have it set to repeat the button... Media Center will never fast-scroll through the guide. This is because Media Center needs to detect that you are holding down the button in order to start fast-scroll.
How do you add the HID registry keys back? I think this will resolve the issues I'm having...
barnabas1969
Experienced User
Posts: 133
Joined: Sat Feb 04, 2012 1:42 am

Re: Windows Media Center (MCE) - Beta

Post by barnabas1969 »

@muzicman0: Download the attached text file. Rename it to change the file extension to .reg, and double-click it.
Attachments
temp.txt
(3.9 KiB) Downloaded 829 times
muzicman0
Posts: 9
Joined: Tue Jul 24, 2012 8:14 pm

Re: Windows Media Center (MCE) - Beta

Post by muzicman0 »

barnabas1969: Thanks!

Just to be sure though, this will work on any MCE remote? Just want to make sure it's not brand specific...

mm0
barnabas1969
Experienced User
Posts: 133
Joined: Sat Feb 04, 2012 1:42 am

Re: Windows Media Center (MCE) - Beta

Post by barnabas1969 »

Yes, any MCE remote.
steve1977
Posts: 17
Joined: Sun Dec 01, 2013 8:50 am

Re: Windows Media Center (MCE) - Beta

Post by steve1977 »

Digging out a very old thread, but hope that the developer is still around?!

My problem is that the plugin checks whethe MCE is running and otherwise does not pass on the keyclick. Is there any way tp disable the "MCE-check"?

Context is that I am running Mediabrowser3 on Win7x64. Mediabrowser uses the MCE keymap. Please note that I am not using the MCE remote, but need this plugin for the MCE keymap.

Thanks!!!
arjanm
Posts: 13
Joined: Sun Feb 17, 2013 4:50 pm

Re: Windows Media Center (MCE) - Beta

Post by arjanm »

steve1977 wrote:My problem is that the plugin checks whethe MCE is running and otherwise does not pass on the keyclick. Is there any way tp disable the "MCE-check"?

Context is that I am running Mediabrowser3 on Win7x64. Mediabrowser uses the MCE keymap. Please note that I am not using the MCE remote, but need this plugin for the MCE keymap.
I'm not the developer of this plugin, but I will try to help you,

This is a part of the original code:

Code: Select all

FindMCE = eg.WindowMatcher(u'ehshell.exe', u'Windows Media Center', None, None, None, 1, False, 0.0, 0)

class hotKeys(eg.ActionClass):
    def __call__(self):
        hwnds = FindMCE()
        if len(hwnds) != 0:
            eg.SendKeys(hwnds[0], self.value, False)
        else:
            self.PrintError("MCE is not running")
            return
The plugin uses EventGhost to find the window of MCE.
You can edit the code and use a new variable to be checked:

Code: Select all

FindMediabrowser3 = eg.WindowMatcher(u'mediabrowser3process.exe', u'Media Browser 3 Windows Title', None, None, None, 1, False, 0.0, 0)

class hotKeys(eg.ActionClass):
    def __call__(self):
        hwnds = FindMediabrowser3()
        if len(hwnds) != 0:
            eg.SendKeys(hwnds[0], self.value, False)
        else:
            self.PrintError("Mediabrowser3 is not running")
            return
To edit the plugin, remove the plugin from EG, find the plugin folder, delete the _init_ .pyc, edit the _init_.py and import the plugin in EG.

I did not test these code adjustments, use at your own risk.
steve1977
Posts: 17
Joined: Sun Dec 01, 2013 8:50 am

Re: Windows Media Center (MCE) - Beta

Post by steve1977 »

Unfortunately, this does not work. When installing the revised plugin, I am getting the following error message:

Traceback (most recent call last) (1640):
File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 153, in CreateInstance
plugin.__init__()
File "C:\Program Files (x86)\EventGhost\plugins\MCE\__init__.py", line 124, in __init__
self.windowMatch = FindMCE
NameError: global name 'FindMCE' is not defined
arjanm
Posts: 13
Joined: Sun Feb 17, 2013 4:50 pm

Re: Windows Media Center (MCE) - Beta

Post by arjanm »

steve1977 wrote:Unfortunately, this does not work. When installing the revised plugin, I am getting the following error message:

Traceback (most recent call last) (1640):
File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 153, in CreateInstance
plugin.__init__()
File "C:\Program Files (x86)\EventGhost\plugins\MCE\__init__.py", line 124, in __init__
self.windowMatch = FindMCE
NameError: global name 'FindMCE' is not defined
The line "self.windowMatch = FindMCE" should be replaced by "self.windowMatch = FindMediabrowser3".
Post Reply