INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"  (Read 3717 times)

scm

  • World Citizen
  • ***
  • Posts: 171

What do I need to do first to get started customizing my own commands for my remote control, etc.?

I found the document for MC Core Commands here http://wiki.jrmediacenter.com/index.php/Media_Center_Core_Commands

But I don't know enough to even know how to use them.  Is there a tutorial on how to get started learning about how to do this?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42442
  • Shoes gone again!
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #1 on: October 26, 2009, 01:49:15 pm »

Are you using the remote control features built into Media Center in Options > Remote Control?

If so, click "Commands" on that dialog to configure custom remote commands.
Logged
Matt Ashland, JRiver Media Center

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72541
  • Where did I put my teeth?
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #2 on: October 26, 2009, 01:50:24 pm »

In MC's options for the Remote, you can use the "Commands" section to add some of the things MC does.

More details about what you want to do might help.
Logged

scm

  • World Citizen
  • ***
  • Posts: 171
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #3 on: October 27, 2009, 12:42:25 pm »

I'm doing preliminary research so that when I buy my remote I make the right choice.

I'm about to purchase the Media Center Remote for $35, so I wanted to know how to:

1. rate songs on the fly 1 to 5 stars
2. change the Player > Playback Options > Preview Mode.  more specifically, I would usually toggle between "Play Entire Song" and "Play 2 min Preview (from 30 seconds in)"


Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72541
  • Where did I put my teeth?
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #4 on: October 27, 2009, 12:56:33 pm »

Take a look at the list of commands under Tools/Options/Remote/Commands.  That's what is possible to add to the standard programming of the remote.
Logged

scm

  • World Citizen
  • ***
  • Posts: 171
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #5 on: October 27, 2009, 03:47:07 pm »

Thanks so much Jim.  I'm ordering my Media Center Remote tomorrow.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72541
  • Where did I put my teeth?
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #6 on: October 27, 2009, 03:48:16 pm »

Thanks!
Logged

scm

  • World Citizen
  • ***
  • Posts: 171
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #7 on: November 03, 2009, 09:35:31 am »

Ok I've got my Media Center Remote for $35 today, and it works fine for normal commands just by plugging it in.  No installation or drivers, I like that!

However, I'm trying to add some custom commands by clicking Add, under Tools>Options>Remote Control>Commands.

But it only lets me select from a dropdown of current basic commands.  It doesn't let me enter my own parameter or command name.

How do I add a custom command?  Specifically I want to rate the current song 1 to 5 stars "10023   MCC_SET_CURRENTLY_PLAYING_RATING   int nRating (0 means ?)"
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72541
  • Where did I put my teeth?
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #8 on: November 03, 2009, 09:44:01 am »

You can add a custom command in the same place.  Picture attached.
Logged

scm

  • World Citizen
  • ***
  • Posts: 171
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #9 on: November 03, 2009, 10:33:26 am »

Right, then that brings up the Edit Remote Command dialogue.

I click Add Command, but it only lets me choose from preprogrammed commands. 

I know the parameter for rating is 10023, and for preview mode is 10031.

I know variables must be passed for these commands to be valid.

I'm not at all able to progress past this step.  How do I do it?

Thanks so much for your time.
Logged

scm

  • World Citizen
  • ***
  • Posts: 171
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #10 on: November 28, 2009, 11:36:28 am »

What do I do after I click Custom?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42442
  • Shoes gone again!
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #11 on: November 28, 2009, 02:13:55 pm »

To post a custom command, perhaps you could run MC14.exe /MCC [Command Code],[Parameter]

The remote system lets you run command line programs.
Logged
Matt Ashland, JRiver Media Center

scm

  • World Citizen
  • ***
  • Posts: 171
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #12 on: November 29, 2009, 04:55:12 pm »

Thanks.  I got it to work.  I didn't realize I had to go to the system32 directory to find MC14.exe.

The one thing I can't figure out how to do is set the Preview Mode to "Play Entire Song"

The command is /MCC 10031,[DurationSeconds],[StartSeconds]

so I tried /MCC 10031,99999,0 but the "99999" is messing it up.  What should I put instead to communicate "entire length of song"?
Logged

scm

  • World Citizen
  • ***
  • Posts: 171
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #13 on: November 29, 2009, 05:09:57 pm »

Also, it is not starting at 0 seconds in, it starts at 24 seconds in, even though I put 0 in the last field.

Thanks.
Logged

scm

  • World Citizen
  • ***
  • Posts: 171
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #14 on: November 29, 2009, 07:21:54 pm »

Actually, now that I really listen, it's not picking up the nStartSeconds variable at all.  If anyone knows what's wrong with my formatting please let me know.  All the other commands I'm programming are working fine.
Logged

scm

  • World Citizen
  • ***
  • Posts: 171
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #15 on: December 04, 2009, 12:20:02 pm »

Can anyone see if this is a bug or if I am formatting my command wrong?  Thanks so much!
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4583
Re: How do I learn to "Post a WM_MC_COMMAND based message to the MC frame"
« Reply #16 on: December 04, 2009, 04:08:22 pm »

Thanks.  I got it to work.  I didn't realize I had to go to the system32 directory to find MC14.exe.

The one thing I can't figure out how to do is set the Preview Mode to "Play Entire Song"

The command is /MCC 10031,[DurationSeconds],[StartSeconds]

so I tried /MCC 10031,99999,0 but the "99999" is messing it up.  What should I put instead to communicate "entire length of song"?
i played around with a bit. first you dont have to go to the system 32 dir, just use mc14.exe, windows 'knows' where to find it. you really want to play the whole song in preview mode? if so, why? would sending a standard play command not be enough to play the song from start to end? mc14.exe /mcc 10000,0
i tried 5000 for the duration, wich seems enough for most songs, maybe 99999 is a bit overdone  ? ? it seems to start at 0 for me when i say so.

 :)
gab
Logged

scm

  • World Citizen
  • ***
  • Posts: 171

Yes I go to Options > Remote Control > Commands > Add > Custom... > Add Run

Then in Executable Filename I put mc14.exe
In parameters I put /mcc 10023, 120, 30

hoping it will play 120 seconds of the song but starting at the 30 second mark.

I name the command and push ok, then I select my command from the list and click Start Learning, then click the button on the remote I want to trigger this.

When I trigger this while a song is playing it restarts from the beginning, not 30 seconds in.  However, it does only play 120 seconds.

What do I need to do to start the song 30 seconds in?
Logged

scm

  • World Citizen
  • ***
  • Posts: 171

Basically I don't fully understand this:

low 12 bits: int nDurationSeconds, high 12 bits: int nStartSeconds

Can someone explain?

It's from the Media Center Core Commands in the wiki
Logged
Pages: [1]   Go Up