INTERACT FORUM

Please login or register.

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

Author Topic: Problems with command line options  (Read 5367 times)

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Problems with command line options
« on: January 30, 2010, 06:35:40 pm »

I am trying to run MC through MeediOS, to do thst I am using a plugin called playmee, it basically sends the file being played to another program. (that is it opens the program, and if you add "{queue}" to the parameters, it sends the filename as a parameter (i think, more info can be found on the website http://playmee.hargraveusa.com/). This works more or less, fine, the video player in MC is started with the right file.  However i have a problem, it doesn't start inn fullscreen, i tried to make the parameters "{queue} /MCC 10027" but when i do that the file i click on is not sent to MC properly, I am a bit of a newbie when it comes to theese parameters, does anybody spot any obvious faults with the way I am trying to do things?

A second question, is there a way to automatically quit MC if i press the stop button in the video-player?
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Problems with command line options
« Reply #1 on: January 31, 2010, 04:04:48 pm »

i guess it will not work.. you need to send the commandline to mc14.exe. so mc14.exe /MCC 10027
is it possible to post the whole script you send via playmee. is it some kind of batch. because what you want could be possible.

mmm.. first: i just looked. but 10027 is for maximizing the window, not for fullscreen.
you could try: /mcc 22009,2
or: /mcc 22000,2
the first one sets to, the second one toggles to fullscreen.

 :)
gab
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #2 on: January 31, 2010, 05:09:57 pm »

Well, in playmee, you choose the excutable, so if i just choose the MC executable (which is called Media Center 14.exe not mc14.exe, does this make a diffrence?) it starts MC, if I add the parameter {queue} it starts MC wiuth the file, and plays it. But when i add additional paramaters, it just starts MC again, so its seems to not do the right thing. I don't excatly know what "queue" does, but I think it just inputs the filepath. So its the same as runnign "Media Center 14.exe /[path to file beeing played]. I don't know if that answered your questions?
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Problems with command line options
« Reply #3 on: January 31, 2010, 05:19:36 pm »

Well, in playmee, you choose the excutable, so if i just choose the MC executable (which is called Media Center 14.exe not mc14.exe, does this make a diffrence?) it starts MC, if I add the parameter {queue} it starts MC wiuth the file, and plays it. But when i add additional paramaters, it just starts MC again, so its seems to not do the right thing. I don't excatly know what "queue" does, but I think it just inputs the filepath. So its the same as runnign "Media Center 14.exe /[path to file beeing played]. I don't know if that answered your questions?
more or less... you should use mc14.exe  . its a file in the system32 folder, and the exe where the switches work with. and you dont need the full path for it, 'windows knows' 8). but when playmee needs it, on my system the mc14.exe is in C:\WINDOWS\system32

hope that helps..

 :)
gab
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #4 on: February 01, 2010, 01:24:50 pm »

Hmm, i have played around a bit, it seems like the MCC commands only work when the program is already open, is that correct? If so it explains my problems (although it doesn't solve them)
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Problems with command line options
« Reply #5 on: February 01, 2010, 04:20:19 pm »

sure.. i guess all. but you could use some other commands.
try
mc14.exe /Mode Fullscreen
to startup mc in fullscreen.
more here.. http://wiki.jrmediacenter.com/index.php/The_Command_Line

and there are some other options. like starting up as mediaserever and go on from there.

 :)
gab

when you get stuck, you could post a bit more details about what you are doing and what is the goal.
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #6 on: March 06, 2010, 04:12:04 pm »

Hello, I have played abit around with it now, it seems like the problem is that onlycommand line option at the time is working, running  "MC14.exe C:\Movies\test.avi" works fine, running "MC14.exe /mode Fullscreen" works fine, however running both "MC14.exe C:\Movies\test.avi /mode Fullscreen" does not work, putting them in different order doesn't work either, nor does using the play-command instead of just inputting the filename.
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #7 on: March 11, 2010, 02:18:35 am »

Hello, I am bumping this question. Is it normal that one cannot use two command line options at the same time?
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #8 on: March 19, 2010, 02:32:16 am »

Sorry for the nagging here, but there must be someone who knows if there is a problem with using two options at the sam time, or if I am just using two options in a wrong way?
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Problems with command line options
« Reply #9 on: March 19, 2010, 02:48:02 am »

two commandline options in one line wont work indeed. maybe you could use a bat file as a workaround.

 :)
gab
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #10 on: March 19, 2010, 06:28:34 am »

Thanks for the info, is this a MC-spesific thing? I am sure i have sseem many examples with other programs with several command-line options outputted to the same program, besides its pretty obvious that it's usefil (as in my example, starting a movie and also running it in fullscreen).

AtW
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Problems with command line options
« Reply #11 on: March 19, 2010, 07:12:31 am »

Thanks for the info, is this a MC-spesific thing? I am sure i have sseem many examples with other programs with several command-line options outputted to the same program, besides its pretty obvious that it's usefil (as in my example, starting a movie and also running it in fullscreen).

AtW
its not mc specific. some programs can some can't. i agree that it could be very usefull though.

 :)
gab
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #12 on: March 19, 2010, 07:29:06 am »

Thanks for the info, I would say that is MC-specific, in the way that it's no inherent limitation in the OS or similar, its just a (to the eyes of a non-programmer) strange choice made by the developer.

AtW
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Problems with command line options
« Reply #13 on: March 19, 2010, 11:13:48 am »

It's a command launcher, not an application. It's specific (and clearly documented) purpose is to execute one command, with applicable parameters. In light of that, and the fact you can run it as many times as necessary from a batch file (or remote control software, or whatever), it's a bit strange to expect it to also handle multiple commands.
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #14 on: March 20, 2010, 08:48:43 am »

It's a command launcher, not an application. It's specific (and clearly documented) purpose is to execute one command, with applicable parameters. In light of that, and the fact you can run it as many times as necessary from a batch file (or remote control software, or whatever), it's a bit strange to expect it to also handle multiple commands.

I don't see the backside of handling several commands, and i can see several uses for it.  But does that mean that if i call the application exe directly, I can use several commands?
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Problems with command line options
« Reply #15 on: March 20, 2010, 11:18:37 am »

Would this multi-command launcher be smart enough to determine whether the commands can be run in parallel or series, whether one affects another, and how to handle an error condition that results from its improper use? What uses would this have that might justify the effort to create such a thing? Why can't a batch file be used instead?
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #16 on: March 20, 2010, 12:10:05 pm »

I don't get your argument? Of course it will take more work than zero to implement, but from a user standpoint i don't see any drawbacks. The use i have indicated in my first post would be a typical use for several command line parameters, and seeing as many programs supports it, i doubt i am the only one who sees the use. If it justifies the effort is a more open question, a lot of functions can be done via script/batch, doesn't mean that thats the best for the avarage user.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Problems with command line options
« Reply #17 on: March 20, 2010, 01:04:33 pm »

Given there are only two cmds to be run here, i think the launcher you use might be able to do it.

"MC14.exe C:\Movies\test.avi"

to run open MC with yoru movie.

Then in playmee, look at the modify program dialog and add "MC14.exe /mode Fullscreen" to maximise MC in post-launch command box.

Or do the reverse, in the pre-launch cmd box do "MC14.exe /mode Fullscreen"

Maybe no need for a script in this case :)
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Problems with command line options
« Reply #18 on: March 20, 2010, 01:49:41 pm »

I don't get your argument?

I think you do, which is why you're arguing. ;)
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #19 on: March 22, 2010, 05:41:14 pm »

Given there are only two cmds to be run here, i think the launcher you use might be able to do it.

"MC14.exe C:\Movies\test.avi"

to run open MC with yoru movie.

Then in playmee, look at the modify program dialog and add "MC14.exe /mode Fullscreen" to maximise MC in post-launch command box.

Or do the reverse, in the pre-launch cmd box do "MC14.exe /mode Fullscreen"

Maybe no need for a script in this case :)
Thanks for the tip, I tried to do it that way, but playmee will only take a complete path as input, so running the two commands one after another starts MC14 two times. and that causes all kinds of problems, I could run a bat-file calling mc14 with mode fullscreen as the main  program in playmee, and tha complete path with the {queue} paramter pre-launch, but the playmee plugins gives the frontend focus depending on when the main program closes, and since the main program in this scenario is the bat-file  that also causes problems.... I am a bit stomped when it comes to this problem.
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Problems with command line options
« Reply #20 on: March 22, 2010, 05:52:58 pm »

have you tried to set the behaviour in mc it self. when you set 'jump on play (video)'to 'display (even in playing now)'. if that works only one command would be left.

 :)
gab
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #21 on: March 22, 2010, 06:20:41 pm »

When the video is playing, it goes to display mode, however display mode is not fullscreen.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Problems with command line options
« Reply #22 on: March 23, 2010, 12:27:01 am »

so running the two commands one after another starts MC14 two times. and that causes all kinds of problems,
Curious why this happens  ?

MC->Options->General->Advanced->Allow multiple instances to run at one time (uncheck)
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #23 on: March 23, 2010, 04:55:50 pm »

Yeah, me to, allow mulitple instances is off, i run mode fullscreen firsts, then /play [filename], i get a dialog box that says

"Media center is running, but there may be a problem. Possible causes:
1. The program is alos running under a different user account
2. Media center 14 and Media server are both in windows startup
3. The program is not responding for an unknown reason.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Problems with command line options
« Reply #24 on: March 24, 2010, 03:30:37 am »

It's dificult to pinpoint where exacty the problem is with that description so better might be to first simulate with a simple batch file.

Write a batch file with the two MC cmds in it then run the batch file outside medio and evaluate whether it works as you would like it to. Just explicitly assign any movie you like MC to play.

The other point to consider is whether playmee can generate a log of the cmds sent to MC this would allow to examine what exactly was being passed.
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #25 on: March 24, 2010, 03:59:52 pm »

It's dificult to pinpoint where exacty the problem is with that description so better might be to first simulate with a simple batch file.

Write a batch file with the two MC cmds in it then run the batch file outside medio and evaluate whether it works as you would like it to. Just explicitly assign any movie you like MC to play.

The other point to consider is whether playmee can generate a log of the cmds sent to MC this would allow to examine what exactly was being passed.

First i want to thank you for beeing so helpful to a total stranger :)

I have seen the log file, and this is what is passed:

C:\Windows\System32\MC14.exe /mode fullscreen
C:\Windows\System32\MC14.exe /Play Z:\movie.avi

Creating a batfile with theese two commands give med the same probelem "media center is running" and so on.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Problems with command line options
« Reply #26 on: March 25, 2010, 03:36:24 am »

Are you running any media server on startup ?

Options->Startup->windows Startup ->Run on windows startup (set to Nothing)

The other possibility as the error message suggests is whether another instance of MC is already running under a different user name.

If so then try the bat file without the above and see what happens.
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Problems with command line options
« Reply #27 on: March 25, 2010, 05:22:26 pm »

I am not running a server, and there is no other MC running from another user, I am pretty sure the problem is the commands themself.
Logged
Pages: [1]   Go Up