View Single Post
Old 22nd August 2021, 15:43   #21
Junior Member
Join Date: Aug 2021
Posts: 6

I know this a very old topic. But I'm trying to do something similar and I can't get it to work.
Maybe someone can help me out please?

I have a lot of playlists on my pc.
I would like to add some extra commands when opening (play) a playlist file.
I know the default action for playlists is "play in Winamp" as it is marked in Bold. You also can choose to "Enqueue in Winamp" if yo want to.
I'm using an extra program (don't know if I can mention it here) where I can see the 2 commands in detail for this file-type.

What I want to do now is, when I open a playlist file (.m3u) from in Windows Explorer by double clicking or pressing enter, I want it to do the following actions before playing the file:
1) disable shuffle
2) disable repeat
3) and then play the selected playlist

I've installed WACommand and I have the following commands so far:
WACommand /random=0
WACommand /repeat=0

This works great under the command-line (DOS).
However I can't get it to play the select file from in Windows Explorer with command-line arguments.
I've noticed that the default command for playing a playlist is: "C:\Program Files (x86)\Winamp\winamp.exe" "%1"
Where for enqueue a playlist is: "C:\Program Files (x86)\Winamp\winamp.exe" /ADD "%1"
I've noticed that "%1" is key here, and is standing for the file you've just selected and want to open in Windows Explorer.

I've tried to do the same with WACommand and changed it like so:
"C:\Program Files (x86)\Winamp\WACommand.exe" /random=0 repeat=0 clear load "%1" play
But apparently that doesn't work. I can't get all those options to work. It only does the first option, disabling the shuffle (random) option.
"C:\Program Files (x86)\Winamp\WACommand.exe" /random=0 /repeat=0 /clear /load "%1" /play also doesn't work.

So my 1st question is: Can I add multiple command-line arguments (options) with WACommand or is it only limited to one? Like "C:\Program Files (x86)\Winamp\winamp.exe" /ADD "%1" ?

That got me thinking. What if I put it all in a batch file.
So I came up with this:
@echo off
cd /d "C:\Program Files (x86)\Winamp"
WACommand /random=0
WACommand /repeat=0
WACommand /clear
WACommand /load "%1"
WACommand /play

I've changed the command-line arguments for play in Windows Explorer to this: "C\Test Batch\Test.bat"
When I double click a playlist, all the commands work until, the /load option is processed. It stops and I get a "Open file" dialogue on my screen. So that doesn't work either.
I also tried this in the command-line arguments: "C\Test Batch\Test.bat" "%1" This also doesn't work.

So, question 2: Is there any way I can make the batch file understand when I want to play the playlist, it has to do al those options with the selected playlist??

One more thing. If I try this as command-line argument:
"C:\Program Files (x86)\Winamp\WACommand.exe" /load "%1"
This actually loads the double clicked playlist in Winamp.

I'm looking forward to your responses.
DJ_Coy is offline   Reply With Quote