Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35

Thread: Media Player Classic Home Cinema GML?

  1. #1
    Join Date
    Nov 2005
    Location
    Redditch, UK
    Posts
    957

    Question Media Player Classic Home Cinema GML?

    The existing MPC gml doesn't work with MPC-HC and my brain is short circuiting atm trying to get the original one to work with the Home Cinema version.

    I'm using Win7 with the 64 bit version of MPC-HC btw. I'm hoping that someone has either already done the new GML or has some advice on how to get the existing gml modded to work with HC.

    Thanks in advance...
    - John H
    * PROMIXIAN TO THE CORE! * (NetRemote2WholeHomePro + Girder5WholeHomePro + USB-UIRT + Touchscreens + WirelessControlSystems + ANNA) == AutomationHeaven
    - "IthinkI'mgoingtobantheuseofthespacebarinfuture..."

  2. #2
    Join Date
    Nov 2005
    Location
    Redditch, UK
    Posts
    957

    Default

    So I'm guessing nobody has done this already?

    Darn!
    - John H
    * PROMIXIAN TO THE CORE! * (NetRemote2WholeHomePro + Girder5WholeHomePro + USB-UIRT + Touchscreens + WirelessControlSystems + ANNA) == AutomationHeaven
    - "IthinkI'mgoingtobantheuseofthespacebarinfuture..."

  3. #3
    Join Date
    Jul 2005
    Location
    Uithuizen, The Netherlands
    Posts
    575

    Default

    what commands do you need?

    If it's just the basic playback commands, I'll put something together.

  4. #4
    Join Date
    Nov 2005
    Location
    Redditch, UK
    Posts
    957

    Default

    Dude, I can flub it with focus and using the keyboard shortcuts... I just would love to know why I can't get the original sendmessage commands to work.

    I just want to get the darn thing to work right in Girder so I can access the commands in NetRemote for my touchscreen panel and then do away with my keyboard/mouse eventually.

    If you could put together one that uses the Media Player Classic gml and make it work for the Media Player Classic - Home Cinema (64bit) I would be MOST happy indeed. My problem is that I've not done any real work in Girder for several years now... it's only because I lost my old setup and have had to go back to an old backup and then updated my hardware that I've had to go back and start again in some places.
    Last edited by NeoMorph; February 12th, 2010 at 04:12 AM.
    - John H
    * PROMIXIAN TO THE CORE! * (NetRemote2WholeHomePro + Girder5WholeHomePro + USB-UIRT + Touchscreens + WirelessControlSystems + ANNA) == AutomationHeaven
    - "IthinkI'mgoingtobantheuseofthespacebarinfuture..."

  5. #5
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    I'm guessing they may have changed more than just the names of the windows, I did have a play with changing the targeting but that didn't help. Would probably require downloading the source code and poring over it to find the correct message numbers
    --Rob

  6. #6
    Join Date
    Jul 2005
    Location
    Uithuizen, The Netherlands
    Posts
    575

    Default

    Quote Originally Posted by Rob H View Post
    I'm guessing they may have changed more than just the names of the windows, I did have a play with changing the targeting but that didn't help. Would probably require downloading the source code and poring over it to find the correct message numbers
    No change to the message numbers as far as I've seen.

    I'm about half way to finishing my "uber" GML that controls Zoomplayer, MPC, MPC-HC, VLC, Meedio, MeediOS, etc with fast and easy configuration. It will take me another day or two.

    here's an example of the MPC versus MPC-HC commands

    Code:
    local action = pld1 -- use "Play" instead of pld1 to test
    local pid = nil
    local handle = nil
    
    --MPC example
    if pid == nil then pid = win.FindProcess("mplayerc.exe") 
    	if pid ~= nil then handle = win.FindWindow("MEDIAPLAYERCLASSICW", nil)
    	if handle ~= nil then 
    	
    		if action == "Play" 		then win.SendMessage(handle, 273, 887, 0) end
                    -- etc.
    
    	else pid = nil end 
    	end
    end
    
    --MPC-HC example
    if pid == nil then pid = win.FindProcess("mpc-hc.exe")     
    	if pid ~= nil then handle = win.FindProcessWindow(pid)
    	if handle ~= nil then 
    		
    		if action == "Play" 		then win.SendMessage(handle, 273, 887, 0) end 
                    -- etc.
    
    	else pid = nil end 
    	end
    Last edited by blubberhoofd; February 12th, 2010 at 05:18 PM.

  7. #7
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    I may have been targeting the wrong window then.

    If all the actions use SendMessage, then I'd probably recommend using a table driven approach rather than a large sequence of if-then-else statements.
    --Rob

  8. #8
    Join Date
    Jul 2005
    Location
    Uithuizen, The Netherlands
    Posts
    575

    Default

    @ Rob

    If the commands were pretty much the same throughout all the applications and you want a static setup, then I would agree.

    This GML is aimed to be for the beginner as well as the experts, the "if, then else" arrangement allows for a quick understandig of the inner workings, while allowing for a lot of customisation.

    Just wait and see, there are a lot of advantages to this approach


    Note: just editted the code in my previous post to closer reflect the code that I'll be using.
    Last edited by blubberhoofd; February 12th, 2010 at 05:21 PM.

  9. #9
    Join Date
    Nov 2005
    Location
    Redditch, UK
    Posts
    957

    Default

    Thanks guys... trying to sort this out in my head while being stoned out of my head on pain meds is a right pain (sorry for the poor pun lol).

    Mind you, if I had the same problem as Rob then I don't feel too bad.

    There is one thing I need to point out...

    Code:
    if pid == nil then pid = win.FindProcess("mpc-hc.exe")
    ... is actually going to be...

    Code:
    if pid == nil then pid = win.FindProcess("mpc-hc64.exe")
    ... in the 64 bit version I think.
    Last edited by NeoMorph; February 12th, 2010 at 05:38 PM.
    - John H
    * PROMIXIAN TO THE CORE! * (NetRemote2WholeHomePro + Girder5WholeHomePro + USB-UIRT + Touchscreens + WirelessControlSystems + ANNA) == AutomationHeaven
    - "IthinkI'mgoingtobantheuseofthespacebarinfuture..."

  10. #10
    Join Date
    Jul 2005
    Location
    Uithuizen, The Netherlands
    Posts
    575

    Default

    Quote Originally Posted by NeoMorph View Post
    Thanks guys... trying to sort this out in my head while being stoned out of my head on pain meds is a right pain (sorry for the poor pun lol).
    Me too, and also using anti-biotics
    Deaf in one ear too ATM

    Quote Originally Posted by NeoMorph View Post
    Mind you, if I had the same problem as Rob then I don't feel too bad.

    There is one thing I need to point out...

    Code:
    if pid == nil then pid = win.FindProcess("mpc-hc.exe")
    ... is actually going to be...

    Code:
    if pid == nil then pid = win.FindProcess("mpc-hc64.exe")
    ... in the 64 bit version I think.
    thanks, I'm still using 32 bits, so I didn't notice that.

    BTW: with this approach you'll only need to edit one line of code to change the targetting of all your commands for the application. Sure beats having to edit all of your commands
    Last edited by blubberhoofd; February 12th, 2010 at 06:05 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •