INTERACT FORUM

Please login or register.

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

Author Topic: Stacking mjextman commands  (Read 2262 times)

Scronch

  • Guest
Stacking mjextman commands
« on: July 17, 2002, 11:23:48 pm »

Under Win2k with MJ not running, I put this in a shell script:


mjextman.exe /Clear
mjextman.exe /Play "TREEPATH=Playlists\listname"



The first command starts MJ and clears PN.  But the list from the second command never gets played.  So I tried this:


start /w mjextman.exe /Clear
mjextman.exe /Play "TREEPATH=Playlists\listname"



But still no joy.

So then I inserted a short sleep-type loop between the commands:


start /w mjextman.exe /Clear

echo Do                      >%TEMP%.\~tmp.vbs
echo Loop Until True = False>>%TEMP%.\~tmp.vbs
CSCRIPT //B //Nologo //T:5 %TEMP%.\~tmp.vbs
del %TEMP%.\~tmp.vbs

mjextman.exe /Play "TREEPATH=Playlists\listname"



STILL no joy.

Please, what am I doing wrong?  

Scronch
Logged

Raymond

  • Regular Member
  • Recent member
  • *
  • Posts: 12
RE:Stacking mjextman commands
« Reply #1 on: July 18, 2002, 07:09:58 am »

Is there a reason you need to use /Clear? Since /Play "TREEPATH=Playlists\listname" will replace the existing list.

Ray
Logged
Ray

Scronch

  • Guest
RE:Stacking mjextman commands
« Reply #2 on: July 18, 2002, 11:31:51 am »

Yeah, I've had a lot of threads going on this. The lines I listed are for when MJ is not running. When MJ is running, I don't want to clear the whole playlist, because I don't want to kill the current song. Instead I use the DontRemoveCurrent option followed by an Append:

cd C:\Program Files\J River\Media Jukebox
start /w mjextman.exe /Clear DontRemoveCurrent
mjextman.exe /Append "TREEPATH=Playlists\listname"


But I have the exact same problem, namely that the Append doesn't happen. There is some sort of process completion or timing issue going on here.


HELP!


Scronch
Logged

JimH

  • Citizen of the Universe
  • *****
  • Posts: 7604
  • Miller drives a tall-masted tractor on the ocean
RE:Stacking mjextman commands
« Reply #3 on: July 18, 2002, 11:34:19 am »

Nice use of emoticons.  Can you do a flag next time?
Logged
Jim Hillegass
JRiver Media Center / Media Jukebox

Scronch

  • Guest
RE:Stacking mjextman commands
« Reply #4 on: July 18, 2002, 12:02:28 pm »

Sure...


  

  

  









But now Matt or Nikolay have to help me!

Scronch
Logged

Scronch

  • Guest
RE:Stacking mjextman commands
« Reply #5 on: July 18, 2002, 11:27:17 pm »

...bump in honor of patriotism...
Logged

Poison Dan

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 95
RE:Stacking mjextman commands
« Reply #6 on: July 18, 2002, 11:33:08 pm »

Scronch,

You Da Man.
Logged

Scronch

  • Guest
RE:Stacking mjextman commands
« Reply #7 on: July 19, 2002, 12:48:47 pm »

t'anks, dude.

I think I have a complaint for JimH--too many people are using MJ!  Interact has become so busy, my posts get bounced back a few pages in half a day...

Scronch
Logged

JimH

  • Citizen of the Universe
  • *****
  • Posts: 7604
  • Miller drives a tall-masted tractor on the ocean
RE:Stacking mjextman commands
« Reply #8 on: July 19, 2002, 12:55:27 pm »

Scronch!  I think you've got real talent.  Can you draw a cat?

(I'm not stalling.  Really.  Just trying to help you keep this on the front burner so somebody finally gives in and does something for you.)
Logged
Jim Hillegass
JRiver Media Center / Media Jukebox

Nikolay

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1681
  • Former CTO, JRiver, Inc.
RE:Stacking mjextman commands
« Reply #9 on: July 19, 2002, 01:20:39 pm »

Scronch,

It works,

Here is the contents of BAT file I created:

"C:\Program Files\J River\Media Jukebox\mjextman.exe" /Clear DontRemoveCurrent
"C:\Program Files\J River\Media Jukebox\mjextman.exe" /Append "TREEPATH=Media Library\Artist/Album\Demo"

Nikolay
Logged

Scronch

  • Guest
RE:Stacking mjextman commands
« Reply #10 on: July 20, 2002, 01:57:02 pm »

Hey folks -

Gotta head over to Minnesota on short notice for a funeral.  I'll check this out when I return.  Thanks for looking into it.

Scronch
Logged

JimH

  • Citizen of the Universe
  • *****
  • Posts: 7604
  • Miller drives a tall-masted tractor on the ocean
RE:Stacking mjextman commands
« Reply #11 on: July 20, 2002, 02:27:59 pm »

Sorry to hear it Scronch.  Stop by if you have time.
Logged
Jim Hillegass
JRiver Media Center / Media Jukebox

Scronch

  • Guest
RE:Stacking mjextman commands
« Reply #12 on: July 23, 2002, 12:27:46 pm »

JimH - I thought about it, but we just didn't have time.  Too much driving, and not a fun trip.

Nikolay - The command you give behave the same as mine.  I think the key is that MJ is NOT running when I execute the script.  Did you try with MJ NOT running?

Thanks.

Scronch
Logged

Scronch

  • Guest
RE:Stacking mjextman commands
« Reply #13 on: July 24, 2002, 09:08:37 am »

Nikolay, to clarify--the bat file works as expected if executed when MJ is already running.  When MJ is not already running, the 2nd command is not "seen" by MJ.

Scronch
Logged

Nikolay

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1681
  • Former CTO, JRiver, Inc.
RE:Stacking mjextman commands
« Reply #14 on: July 24, 2002, 11:07:32 am »

OK, I got it.  I'll try to fix it in the next build.

Nikolay
Logged

Scronch

  • Guest
RE:Stacking mjextman commands
« Reply #15 on: July 24, 2002, 02:02:21 pm »

Logged

Scronch

  • Guest
RE:Stacking mjextman commands
« Reply #16 on: July 25, 2002, 11:33:10 pm »

Nikolay -

The stacking is working now.  Thank you.  This brings up two more questions:

1) When I try to use Media Scheduler to schedule a Periodic Custom Task, it apparently only allows me to choose .exe files, not .bat files.  Is there a way around this?  I'd prefer to use Media Scheduler rather than the Windows Task Scheduler or an at or cron command.

2) In a .bat file containing mjextman.exe commands, does it matter what directory the commands are executed from?  In other words, should I include a 'cd %temp%' at the top?  Or does MJ never leave any relics in the dos shell directory that the .bat file runs from?

Thanks.

Scronch
Logged

Scronch

  • Guest
RE:Stacking mjextman commands
« Reply #17 on: July 25, 2002, 11:45:42 pm »

Sorry, forgot to add this one:

3) Is there a way to make an Execute Parameter command (like mjextman.exe /Append) behave like a Command Parameter command?  Specifically, I want to manually start MJ each day, and then at specific times of the day the scheduled scripts will clear PN (except for current) and append a shuffled smartlist--but if MJ is not running when the task comes up, I don't want it to start.  I reviewed the command line parameter list again, but I don't see any option to disable the auto-run behavior of an Execute Parameter command (like maybe mjextman.exe /Append "TREEPATH=Media Library\Artist/Album\Demo" NoAutoRun )

If not, it's not a big deal.  I would just stop Media Scheduler at the end of each day.  The next day, Media Scheduler would be started, and MJ would be started.

Scronch
Logged

Mirko

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 495
  • Coffee ready?
RE:Stacking mjextman commands
« Reply #18 on: July 25, 2002, 11:52:00 pm »

Batch-Files:

You can use cmd.exe to run a batchfile:

cmd.exe /c batchfile.bat

HTH
Logged

Scronch

  • Guest
RE:Stacking mjextman commands
« Reply #19 on: July 25, 2002, 11:59:48 pm »

Darn it, I knew that.  Thanks!!

Scronch
Logged

Scronch

  • Guest
RE:Stacking mjextman commands
« Reply #20 on: July 28, 2002, 05:29:25 pm »

...bump these two questions:

A) In a .bat file containing mjextman.exe commands, does it matter what directory the commands are executed from? In other words, should I include a 'cd %temp%' at the top? Or does MJ never leave any relics in the dos shell directory that the .bat file runs from?

B) Is there a way to make an Execute Parameter command (like mjextman.exe /Append) behave like a Command Parameter command? Specifically, I want to manually start MJ each day, and then at specific times of the day the scheduled scripts will clear PN (except for current) and append a shuffled smartlist--but if MJ is not running when the task comes up, I don't want it to start. I reviewed the command line parameter list again, but I don't see any option to disable the auto-run behavior of an Execute Parameter command (like maybe mjextman.exe /Append "TREEPATH=Media Library\Artist/Album\Demo" NoAutoRun ).  Or maybe there's a workaround?

Thanks.

Scronch
Logged
Pages: [1]   Go Up