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.
stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: Windows Media Center (MCE) - Beta

Post by stottle »

tnkrer wrote:Thanks Brett, That's what I was looking for!
No problem. Glad you got it working!
JasonD wrote: Yes, the logs look like this.

Code: Select all

MceRemote.Right
   MCE: Right
      MCE: Right
Event, Macro, Action.
Ok, that looks like a problem in the plugin. Does it make any difference between fullscreen or not?

Here's the relevant code. Since you aren't getting the "MCE is not running" message, the FindMCE() call must be succeeding. My guess is that ehshell is made up of multiple windows, and the message is being sent to the wrong one.

Code: Select all

FindMCE = eg.WindowMatcher(u'ehshell.exe', u'Windows Media Center', None, None, None, 0, 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
Unfortunately the computer I have with MCE is occupied. Can you run the FindWindow action and see what windows MCE lists? Or better yet, use the FindowWindow results to see if you can find the parameters for WindowMatcher that work? Otherwise you'll have to wait until I bring the computer into my "lab".

Brett
JasonD
Posts: 6
Joined: Fri Nov 13, 2009 6:50 pm

Re: Windows Media Center (MCE) - Beta

Post by JasonD »

stottle wrote: Unfortunately the computer I have with MCE is occupied. Can you run the FindWindow action and see what windows MCE lists? Or better yet, use the FindowWindow results to see if you can find the parameters for WindowMatcher that work? Otherwise you'll have to wait until I bring the computer into my "lab".

Brett
Good question about the fullscreen. I hadn't tried, as my TV is in being repaired, so I only had the one screen attached, and had MCE in windowed mode so I could see both it and EGs log at the same time.

When i get home, I'll try fullscreen as well as trying the findwindow at different levels.
HappyHallsy
Posts: 2
Joined: Sat Nov 14, 2009 8:06 am

Re: Windows Media Center (MCE) - Beta

Post by HappyHallsy »

Heya Guys just on a side note here....... I have modified this plugin ever so slightly to allow for the Jaycar / Digitech xc4889 Keymaps

Was a big problem for alot of people using this remote as a cheap replacement for the Media Centre one that is no longer available in Aus here....

File Attached :)
Attachments
__init__.py
(5.3 KiB) Downloaded 368 times
JasonD
Posts: 6
Joined: Fri Nov 13, 2009 6:50 pm

Re: Windows Media Center (MCE) - Beta

Post by JasonD »

stottle wrote: Unfortunately the computer I have with MCE is occupied. Can you run the FindWindow action and see what windows MCE lists? Or better yet, use the FindowWindow results to see if you can find the parameters for WindowMatcher that work? Otherwise you'll have to wait until I bring the computer into my "lab".

Brett
Tried fullscreen and windowed, both give the same results.
Also tried checking different boxes in the "Find Window" action, (tried both fullscreen and windowed too) and still no luck. It is definitely finding the correct window though, because if I stick a "Bring to Front" command in before the "Emulate Keystroke", it brings Media Center to the front, and is then able to move the selector.

There has to be a way to do it, because MCE responds to the media buttons on my keyboard, even if another window has focus.
nunovi
Posts: 5
Joined: Wed Dec 16, 2009 5:53 pm

Re: Windows Media Center (MCE) - Beta

Post by nunovi »

Hi,

Any news on this? I'm also unable to control Media Center when it's out of focus...
It's a pain especially for the audio commands (play, pause, etc) whilst browsing, requiring me to switch back to WMC just for that. The Windows Media Player plugin works correctly for this but unfortunately it doesn't control videos, just the music in WMC.

Happy to provide any information necessary to help sort out the problem. I'm on Windows 7 Home Premium, EventGhost 0.3.7.r1194, MCE Plugin and Microsoft MCE Remote for Vista/Win7.

Appreciate your help.

Nuno
porko
Posts: 2
Joined: Thu Dec 17, 2009 7:08 pm

Re: Windows Media Center (MCE) - Beta

Post by porko »

I was trying to get EG running with XBMC, but it's takign a lot more effort than expected, which prevents the kids from watching their movies in MCE.

I added the MCE plug in and opted to disable the HID device. The remote control does not operate Vista MCE now (thats expected I guess).

So I need to re-enable it until I have a decent amount of time to play around with it.

Can anyone advise how I re-enable it so we can use MCE?

Many thanks
Paul
porko
Posts: 2
Joined: Thu Dec 17, 2009 7:08 pm

Re: Windows Media Center (MCE) - Beta

Post by porko »

Fixed.

Removed MCE plugin.
Added MCE Plugin but de-selected the option to remove the HID device.
Rebooted. Now all OK.
Common sense really. :-)

Now I know how to do this I can spend some some playing with it. :-)

Paul
rausch101
Posts: 7
Joined: Fri Jan 23, 2009 10:25 pm

Re: Windows Media Center (MCE) - Beta

Post by rausch101 »

Nevermind. Fixed.

Works well...good job!
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Windows Media Center (MCE) - Beta

Post by Bitmonster »

I have some suggestions for this plugin:
1. I would rename it to "Windows Media Center Actions" or something like this, to make it more obvious, that this plugin is intended to operate the MCE program and not a plugin to use an MCE remote.
2. This plugin is a perfect candidate for setting createMacrosOnAdd = True.
3. A GUID for 0.4.0 would be fine.

Looking at the source code, I think some ideas of your ContextSwitch-Branch (or how was it called?), could be adapted to the core. But this we can discuss elsewhere.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: Windows Media Center (MCE) - Beta

Post by stottle »

Bitmonster wrote:I have some suggestions for this plugin:
1. I would rename it to "Windows Media Center Actions" or something like this, to make it more obvious, that this plugin is intended to operate the MCE program and not a plugin to use an MCE remote.
Good idea, will do.
Bitmonster wrote:2. This plugin is a perfect candidate for setting createMacrosOnAdd = True.
True, and I used createMacrosOnAdd originally. My branch doesn't work the same way, which led me to take it out.
Bitmonster wrote:3. A GUID for 0.4.0 would be fine.
I had a computer crash and when I tried to restore from my backup server I discovered my backup server had problems, too. Not nice. So I'm still recovering slowly and I don't have EG development working yet. I will make these changes/test out 0.4/add a GUID when I'm up and running again. I've got a couple other things on my plate, so it is taking longer than I'd expected.
Bitmonster wrote:Looking at the source code, I think some ideas of your ContextSwitch-Branch (or how was it called?), could be adapted to the core. But this we can discuss elsewhere.
Fair enough.

It's great to see you actively engaged on the forums again, BTW!

Brett
per
Posts: 1
Joined: Sat Feb 06, 2010 7:20 am

Re: Windows Media Center (MCE) - Beta

Post by per »

Message to Bitmonster,

I installed a fit-PC2 a few days ago which has a driver for EG. My reason for using the IR port and a basic remote controll is to run Windows Media Center and I was surprised to find that a plugin for WMC did not exist in EG.

After scanning this forum a few evenings I finally found MCE.zip which works really well.

Comments:
It would be great if MCE.zip was included as a plugin called "Plugin for Windows Media Center".
I was confused with the other MCE driver which is for the Microsoft remote, i.e. hardware.

Anyway, EG is a great program and I can now control WMC as I want.

Per
adeb2
Posts: 11
Joined: Tue Feb 16, 2010 1:16 pm

Re: Windows Media Center (MCE) - Beta

Post by adeb2 »

Thank you for writing this plugin Brett.

Is there any change of implementing sending messages to Windows Media Center without it requiring focus ?
I know this is something more people are after.

I see your plugin uses eg.sendKeys(), which in turn calls SendRawCodes2(), which I expected to be able to send messages to non-focused windows.
As SendRawCodes1 explicitly states "Can only send to the frontmost window."

I will play with it a bit more..

Arend
needsnumbers
Posts: 1
Joined: Wed Mar 24, 2010 4:39 pm

Re: Windows Media Center (MCE) - Beta

Post by needsnumbers »

So this is my first reply. I've been trying to get get the plug-in to do what I need... which is control Netflix from within WMC. Trouble is that it doesn't work, fine when in focus and controlling music playback and various navigation but there is no control once the Netflix plug-in is started. Very disappointed and discouraged as I really like my small Sirius satellite remote :(
Is anybody else running into the same trouble? I haven't tried using this plug-in to control movie playback as I don't use WMC to play movies on my system... just Netflix. Ugh
ruggie2
Posts: 7
Joined: Sun Oct 07, 2007 2:04 pm

Re: Windows Media Center (MCE) - Beta

Post by ruggie2 »

So this is my first reply. I've been trying to get get the plug-in to do what I need... which is control Netflix from within WMC. Trouble is that it doesn't work, fine when in focus and controlling music playback and various navigation but there is no control once the Netflix plug-in is started.
Same exact issue here. The same problem also occurs with the PowerDVD plugin for WMC7. Also there is no workaround using the PowerDVD plugin because an event is not created when PowerDVD (or Netflix) is launched through WMC7. I found a few other people having this issue on other forums, but no resolution.

With the PowerDVD plugin you can use the arrow keys and enter only. Keyboard control does not work. The only solution I found is to use an official MCE remote. This is not an option for me because a dedicated PC in the basement runs a TV in one room and projector in another. I use a Firefly RF remote for both setups. Help with this issue would be greatly appreciated. The PowerDVD plugin is nice and seamless and Netflix is great. I hate having to grab the mouse to pause a Neflix movie.
adeb2
Posts: 11
Joined: Tue Feb 16, 2010 1:16 pm

Re: Windows Media Center (MCE) - Beta

Post by adeb2 »

Windows Media Center lacks a decent API to control it externally. It is a real pain in the &%&^ to make any of this work consistently. I know because I have wasted a considerable amount of time creating a plugin that does not require MCE to have focus.
Post Reply