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.

MV2 Player plugin

Got a good idea? You can suggest new features here.
Post Reply
maxxxim
Posts: 7
Joined: Tue Jun 16, 2009 12:28 pm

MV2 Player plugin

Post by maxxxim »

Is it possible to get plugin for a nice little media player like MV2 Player: (http://www.softpedia.com/get/Multimedia ... ayer.shtml)?
I tried myself, but as I only started to use EventGhost only recently I don't know how:(
I need only basic control (play, Pause, Fullscreen, Pan Scan increase/decrease, OSD info, forward/backward etc). I use MCE remote control (Philips SRM5100).
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: MV2 Player plugin

Post by Livin »

if you find out how that player can receive commands (http, etc) then we can help you write it.
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
maxxxim
Posts: 7
Joined: Tue Jun 16, 2009 12:28 pm

Re: MV2 Player plugin

Post by maxxxim »

Livin wrote:if you find out how that player can receive commands (http, etc) then we can help you write it.
OK, it can be receive keyboard commands, (I added my configuration) and also something called WM_COMMAND (example Switch Pause is LPar=2025, WPar=40103). And there is possible to export commands to Girder 3.2, too.
Attachments
commands.txt
(6.71 KiB) Downloaded 344 times
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: MV2 Player plugin

Post by Livin »

if it can receive keybaord commands then you don't need a plugin. just map the commands. I suggest you read the EG Wiki/Documentation to learn how to create the mappings.
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
maxxxim
Posts: 7
Joined: Tue Jun 16, 2009 12:28 pm

Re: MV2 Player plugin

Post by maxxxim »

Livin wrote:if it can receive keybaord commands then you don't need a plugin. just map the commands. I suggest you read the EG Wiki/Documentation to learn how to create the mappings.
OK, I did some mappings, example Switch Pause:
I added macro "Emulate keystrokes", inserted {Space}; pressed MCE Pause button (also Space) and drag/dropped it to Macro. Result: now Eventghost sends two pause commands (because MCE pause button sends "Space" and also EG Macro sends "Space") to MV2 Player but only when MV2Player window is active. When MV2 Player isn't active, it doesn't receive any command.
How can I send only one Pause command to MV2Player and how can I send this command when MV2 Player windows isn't active?
stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: MV2 Player plugin

Post by stottle »

If you want to send keys when the program is in the background, you need a plugin. The commands would look something like this:

Code: Select all

FindProg = eg.WindowMatcher(u'MyProgram',None,None,None, None, 1, False, 0.0, 0)

class hotKeys(eg.ActionClass):    
    def __call__(self):
        hwnds = FindProg()
        if len(hwnds) != 0:
            eg.SendKeys(hwnds[0], self.value, False)
        else:
            self.PrintError("My Program is not running.")
            return

class MyProgram(eg.PluginClass):
    def __init__(self):
        self.AddActionsFromList(ACTIONS)

ACTIONS = (
  (hotKeys,"Play","Play","Play/Pause", u'{Ctrl+P}'),
  (hotKeys,"Pause","Pause","Play/Pause", u'{Ctrl+P}'),
)
You can check out this thread (2nd post) for a plugin shell to start from, as well as info on getting started.

Brett
maxxxim
Posts: 7
Joined: Tue Jun 16, 2009 12:28 pm

Re: MV2 Player plugin

Post by maxxxim »

Unfortunately this is too complicated to me so I have to find some alternative program instead of EG. Thanks anyway!
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: MV2 Player plugin

Post by Pako »

I had some time so I did the plugin. It was not difficult, MV2 Player is perfectly prepared for application of the remote control.
I did test only the most basic functions.
Pako
Attachments
__init__.py
Plugin MV2Player
(27.93 KiB) Downloaded 388 times
maxxxim
Posts: 7
Joined: Tue Jun 16, 2009 12:28 pm

Re: MV2 Player plugin

Post by maxxxim »

Pako wrote:I had some time so I did the plugin. It was not difficult, MV2 Player is perfectly prepared for application of the remote control.
I did test only the most basic functions.
Pako
This is just perfect, everything is working! Thank you very much!
Post Reply