INTERACT FORUM

Please login or register.

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

Author Topic: MC19 to shell Windows command  (Read 2290 times)

ffd97glx

  • Recent member
  • *
  • Posts: 15
MC19 to shell Windows command
« on: January 28, 2014, 02:54:18 pm »

I'm re-engineering my home media system.  MC is fantasic!  I've searched high and low and can't find an answer - is there a way to spawn/shell and Windows command from MC when a 'play' command is executed?  Or is there a plugin?  When I start playing music or video/movie, I'd want MC to turn on my receivers for the audio.  I can write my own BAT or VBS commands to interface with the sound system, but I need the trigger to fire the code.  Any thoght?  TIA
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: MC19 to shell Windows command
« Reply #1 on: January 28, 2014, 03:09:07 pm »

Plug-ins are here:

   http://accessories.jriver.com/mediacenter/accessories.php

but the majority have not been updated in years.  I have no idea which ones work w/MC19.  But maybe they'll give you some ideas, depending upon your needs, or at least prompt additional questions.

There are no trigger events (which could be very useful) outside of plug-ins.  The MCWS service can be used to poll for changes, but I suspect this is really too late to start turning-on equipment.

Let's see what others have to offer...
Logged
The opinions I express represent my own folly.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: MC19 to shell Windows command
« Reply #2 on: January 28, 2014, 03:34:47 pm »

There are no trigger events (which could be very useful) outside of plug-ins.

COM can raise events, including upon playback.  They can be listened to both in-process (via an Interface plugin) and out-of-process (a separate, standalone application like the ones I've done).

It would be a reasonably simple matter to listen for a Play "started" event, check what Zone it happened on, and then launch a particular shell command in response.  You'd have to be a developer, of course, but it wouldn't be rocket surgery.

If you feel like you might be up to this task, and you know C# decently well, yell and I can give you a copy of my wrapper class.  The event listening support in it is pretty rudimentary, but it works.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: MC19 to shell Windows command
« Reply #3 on: January 28, 2014, 03:41:18 pm »

I suppose I used the term "plug-ins" too broadly, but you stated better what I meant.

This seems like a nice opportunity to create an interface plug-in that can be configured to launch programs based on various triggers.
Logged
The opinions I express represent my own folly.

ffd97glx

  • Recent member
  • *
  • Posts: 15
Re: MC19 to shell Windows command
« Reply #4 on: January 28, 2014, 03:42:30 pm »

I can spin circles around the best in SQL (and serveral dead languages).  I can crawl VBscript.  But I can't spell C?.  Before I start up that learning curve, would COM give me events for volume control as well?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: MC19 to shell Windows command
« Reply #5 on: January 28, 2014, 04:57:08 pm »

Before I start up that learning curve, would COM give me events for volume control as well?

Yep.

http://wiki.jriver.com/index.php/Media_Center_Automation#Basics

Please note, this:
Quote
Event Handling and Zones

The events MCC: NOTIFY_TRACK_CHANGE and MCC: NOTIFY_PLAYERSTATE_CHANGE contain the zone where the change occurred. Media Center, however, will only notify changes in the currently active zone. If a track changes in the non-active zone, there will be no event. Only track changes in the active zone will have events.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

ffd97glx

  • Recent member
  • *
  • Posts: 15
Re: MC19 to shell Windows command
« Reply #6 on: January 29, 2014, 06:42:11 am »

Thx!  This will give me a good place to start.
Logged
Pages: [1]   Go Up