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.

TMT3s MCE Player - modified plugin - giving errors...

If you have a question or need help, this is the place to be.
Post Reply
Verohomie
Posts: 5
Joined: Sat Aug 21, 2010 1:07 am
Location: Vero Beach, FL

TMT3s MCE Player - modified plugin - giving errors...

Post by Verohomie »

Hi All -

Brett's TMT plugin works has tested OK with the non MCE Player (uDigital Theater.exe).
Thanks Brett for providing the plugin.

I have modified it to work with TMTs MCE embedded Player (uMCEDVDPlayer.exe).

I am getting errors and no control. Please follow links to screen shots and the modified __init__.py file.

http://verohomies.com/eg_sendkeys_error.png
http://verohomies.com/__init__.py

Note: the active folder uses UDP to broadcast messages to CommandFusion iViewer app running on an iPad. It correctly drives the TMT Blu-ray subpage high for Blu-ray control.
http://verohomies.com/blu-ray_screen.png

Any suggestions, tweeks, etc... appreciated.

TIA - Brad
giantpopples
Posts: 13
Joined: Fri Mar 26, 2010 7:34 pm

Re: TMT3s MCE Player - modified plugin - giving errors...

Post by giantpopples »

Hi !

I also modified the plugin to use with the MCE skin (just to see how it works), on the WindowWatcheri use :

FindTMT = eg.WindowMatcher(u'uMCEDVDPlayer.exe', None, None, None, None, 1, False, 0.0, 0)

And it seems to work.

Also you can add one last control : Enter, very useful when blu ray disables the use of the mouse.. It's simply is :
(hotKeys, 'Enter', 'Enter', 'Enter', u'{Enter}'),

Hope it helps ;) !
Verohomie
Posts: 5
Joined: Sat Aug 21, 2010 1:07 am
Location: Vero Beach, FL

Re: TMT3s MCE Player - modified plugin - giving errors...

Post by Verohomie »

Hi All -

I tried giantpooples suggestion:
FindTMT = eg.WindowMatcher(u'uMCEDVDPlayer.exe', None, None, None, None, 1, False, 0.0, 0)

No luck, still getting errors:
http://verohomies.com/eg_sendkeys_error_v2.png

Here is a screen shot of code changes:
http://verohomies.com/eg_tmt_code.png

Comments, suggestions, changes, etc... welcomed.

Thanks - Brad
Verohomie
Posts: 5
Joined: Sat Aug 21, 2010 1:07 am
Location: Vero Beach, FL

Re: TMT3s MCE Player - modified plugin - giving errors...

Post by Verohomie »

Hi All -

I am stuck. The attached code works with uDigital Theater not with uMCEDVDPlayer.

Please look at code and let me know what I am doing wrong.

Code: Select all

#snip code...
from win32gui import SendMessage, PostMessage
#FindTMT = eg.WindowMatcher(u'uDigital{*}', None, None, None, None, 1, False, 0.0, 0)
#FindTMT = eg.WindowMatcher(u'uMCEDVDPlayer{*}', None, None, None, None, 1, False, 0.0, 0)
#FindTMT = eg.WindowMatcher('uMCEDVDPlayer{*}.exe', 'ArcSoft TotalMedia Theatre for Windows Media Center{*}')
FindTMT = eg.WindowMatcher(u'uMCEDVDPlayer.exe', None, None, None, None, 1, False, 0.0, 0)


class wmAction(eg.ActionClass):
    
    def __call__(self):
        hwnds = FindTMT()
        if len(hwnds) != 0:
            PostMessage(hwnds[0], 0x8D52, self.value, 0)
            print self.value
        else:
            self.PrintError("wmAction Error")
            return

class hotKeys(eg.ActionClass):
    
    def __call__(self):
        hwnds = FindTMT()
#	hwnds = eg.lastFoundWindows
        if len(hwnds) != 0:
#            eg.SendKeys(hwnds[0], self.value)
            eg.SendKeys(hwnds[0], self.value, False)
	    print self.value
        else:
            self.PrintError("HotKeys test Error")
            return
Am I getting the "HotKeys test Error" because the windows handle is screwed up?

How would I print the windows handle to verify that I am getting something?

Is the windows handle needed inorder to pass the SendKeys value to the correct window?

This is new territory for me. Been programming Crestron for last 10 yrs.

NOTE: I left commented lines to show what I have been playing with.

Thanks, Brad
stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: TMT3s MCE Player - modified plugin - giving errors...

Post by stottle »

I'm not running MCE, so I can't give you the answer, but I can try to point you in the right direction.

You really need to do trial and error to find the right window. My recommendation is to open EG and then open it's shell (help -> python shell). That will give you a command line python shell you can play in.

If you run

Code: Select all

eg.WindowMatcher(u'uDigital{*}', None, None, None, None, 1, False, 0.0, 0)()
your output will be any matching windows. If you get results, then you can try

Code: Select all

eg.SendKeys(hwnds[0], self.value, False)
just replace self.value with a specific value from the plugin (self isn't defined in the command shell like it is within the plugin).

If you get more than one window, you will probably need to play with the child class/child name parameters to find the correct sub-window.

You can set the first parameter to None and set the window class (3rd parameter) to "eHome Render Window", which might get you started in the right direction.

Good luck, and please post back the results.

Brett
Post Reply