INTERACT FORUM

Please login or register.

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

Author Topic: Command line automation errors  (Read 1521 times)

eastons

  • Recent member
  • *
  • Posts: 7
Command line automation errors
« on: August 21, 2010, 12:41:48 am »

When I attempt a simple

C:\Users\#####>mc15 /play C:\Users\Public\Music\Sample Music\kalimba.mp3|Zo
ne=2

I get back:

'Zone' is not recognized as an internal or external command,
operable program or batch file.

is | not the current deliminator?
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Command line automation errors
« Reply #1 on: August 22, 2010, 06:21:03 pm »

When I attempt a simple

C:\Users\#####>mc15 /play C:\Users\Public\Music\Sample Music\kalimba.mp3|Zo
ne=2

I get back:

'Zone' is not recognized as an internal or external command,
operable program or batch file.

is | not the current deliminator?

from what are you sending the command?
first it should not be
C:\Users\#####>mc15
the mc15.exe file resides in the system 32 folder.. and widows knows.  8)
so:
mc15.exe /play C:\Users\Public\Music\Sample Music\kalimba.mp3|Zone=2
could work
but depending on the program it could nee some extra """ or \\\

 :)
gab
Logged

eastons

  • Recent member
  • *
  • Posts: 7
Re: Command line automation errors
« Reply #2 on: August 23, 2010, 09:42:08 am »

Oh yea I included the "c:\blablabal" to kinda set the mood for a command line question.

mc15 /play C:\Users\Public\Music\Sample Music\kalimba.mp3       works just fine without any extra escape characters its only when I attach the | that I get the error.

I verified this also happens when doing this call through a Shell in .net.

ohhhhh I just dawned on me that I may need to escape the '|'    as \174. I'll give that a try when I get home from work.

Logged

eastons

  • Recent member
  • *
  • Posts: 7
Re: Command line automation errors
« Reply #3 on: August 25, 2010, 08:22:48 am »

Nope I tried several variations of the escape codes for |.  Anyone have ideas or is this just broken atm?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Re: Command line automation errors
« Reply #4 on: August 25, 2010, 08:30:18 am »

You may need to place quotes around the command or part of it.

Being specific about what you're doing will help others understand or test.  Show the entire command.
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Command line automation errors
« Reply #5 on: August 25, 2010, 09:25:45 am »

Nope I tried several variations of the escape codes for |.  Anyone have ideas or is this just broken atm?
no, its not broken atm, for me that is.
i send a command like that using lua in girder. i just copy/paste it in a bat file.
this works.. sending it also to the right zone:
mc15.exe "/PlayReplace TREEPATH=Playlists\\Remote\\WholeAlbum|zone=0"

so, maybe try something like that. or indeed post exactly what you do.

 :)
gab

edit: i did some more testing with a bat and an mp3.. this works:
mc15.exe "/play D:\GoodMoodBadVibe.mp3|zone=3"
so the double \\ is only needed when sending it inside the tree of mc or maybe residue of ages ago when i made that command.. something that still works none the less.
Logged

eastons

  • Recent member
  • *
  • Posts: 7
Re: Command line automation errors
« Reply #6 on: August 25, 2010, 03:10:20 pm »

Wrapping in quotes works. Thanks Gappie and JimH.

Long write up, Ive made some really simple inwall touchscreens to control each zone. They send a simple serial command to my pc. I'm currently writing a simple VB.net program to listen and run appropriate scripts.

I found the command line interface keeps things much less obfuscated in my code then the COM.


the Command line call to play a file is like:
mc15.exe /play C:\Users\Public\Music\Sample Music\kalimba.mp3|Zone=2

you need to wrap the arguments in quotes such as
mc15.exe "/play C:\Users\Public\Music\Sample Music\kalimba.mp3|Zone=2"



my code now reads

Shell("mc15.exe '/play" & srcAudioFile & "|Zone=" srcSerialPort.Name &"'")


and works like a charm.

Logged
Pages: [1]   Go Up