INTERACT FORUM

Please login or register.

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

Author Topic: Enhancement Request - commandline events  (Read 822 times)

drhyoung

  • Recent member
  • *
  • Posts: 32
Enhancement Request - commandline events
« on: June 18, 2013, 10:05:19 pm »

For us non-programmers, who can't use the MC Automation Event handling, a very useful workaround might be the following:

MC18.exe /SleepUntilEvent

This would cause the commandline to pause until MC is shut down or one of the "FireMJEvent" events (described in http://wiki.jriver.com/index.php/Media_Center_Automation) fire.
"Icing on the cake" would be to have the exit/return code being a numeric combination of Zone Number and Event.

The command scripted to follow might then interrogate MC for changed information.



Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Enhancement Request - commandline events
« Reply #1 on: June 19, 2013, 08:39:32 pm »

There are a bunch of issues, some of which, off the top of my head:

   - the Windows command line and runtime environment wasn't really designed for this.  Error status codes are not so common, and don't transport much information (a number).
   - MC's MC##.exe is a dispatcher - it sends a message and terminates (generally successfully).
   - You'd have to be able to handle the case when MC isn't running, or was running but aborted between the time you called it w/SleepUntilEvent and your next script instruction (a race condition).
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up