INTERACT FORUM
More => Old Versions => JRiver Media Center 18 for Windows => Topic started by: drhyoung 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.
-
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).