![]() |
#1 |
Junior Member
Join Date: Aug 2004
Posts: 1
|
Winamp Ms Dos arguments
Hi All.
I 'd like to know if it were possible to send commands to winamp thru a Ms Dos command line (or a "Wdos - R" dialog). I would also like to know how could i do this. Thx 4 ur answers. ![]() |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Dec 2000
Posts: 14,385
|
Winamp Application Programming Interface, includes command line switches.
There is also /BOOKMARK Places file in Winamp's bookmarks example C:\Program Files\Winamp\Winamp.exe /BOOKMARK C:\Media Files\Cool Sound.WAV Or, you may want to try a command line app/"plug-in"... WACommand (DrO's update) -or- CLEveR -or- CLAmp [edit 02 July 05 > JonnyMac]added CLAmp link [/edit] |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Jan 2006
Location: Robot Hell
Posts: 13
|
Or, you may want to try a command line plug-in...
WACommand -or- CLEveR -or- CLAmp I tried all 3 of these and found huge flaws in all of them. WACommand worked the best, but its missing the ability to load files/playlists. A shame really since the program works flawlessly. CLEveR is poorly designed from the get-go. You MUST have winamp loaded before using command line. Why couldn't the author make the program call the winamp.exe on option execution is beyond me. CLAmp is loaded in features, but has the winamp install path hard coded. So if you've installed winamp into any other folder but default, you get the "can't start winamp" error when program is executed. Can someone out there point me to a command driven plugin which allows for playlist/file loading but doesn't have the winamp path hardcoded? |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: Aug 2004
Posts: 8
|
As far as the inability to start winamp from CLEveR, it's really easy to fix with a script, even a simple batch file can do it, just start winamp and then CLEveR from your script...
I am not really sure about CLAmp, but I wonder if the static location of winamp can be faked through use of shortcuts... basically, if you made a shortcut to winamp.exe and called it winamp.exe, and shoved it into the folder where CLAmp wants it... maybe make shortcuts for anything else that it expects. This is just a guess though, and might not work. |
![]() |
![]() |
![]() |
#5 |
Join Date: Sep 2003
Posts: 27,873
|
you said WACommand worked the best well... you just need to find someone who can code who'll add that feature in for you seeing as the source code is available and in all honesty it's a simple addition to add in a /loadfile option
-daz |
![]() |
![]() |
![]() |
#6 | |
Junior Member
Join Date: Jan 2006
Location: Robot Hell
Posts: 13
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#7 |
Join Date: Sep 2003
Posts: 27,873
|
WACommand v2.3.0.0
![]() -daz |
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: Jan 2006
Location: Robot Hell
Posts: 13
|
Thank you Dr.O for going out of your way and programming that in for me. Though I must say this is proving more difficult then I had originally anticipated.
It seems that while Winamp is loading, it will not parse any commands, so the configuration below will not work. play.bat wacommand /start <needs to be a delay here, batches don't have delays, least I don't know of any> wacommand /clear wacommand /load test.m3u wacommand /play How does anyone get any of these Command Prompt plugins to work through batch files? Any help would be appriciated as all I want to do is the following... Load up Winamp Clear Current Play List Load Playlist Play ...all by running 1 batch file (though I don't care how many batches that 1 batch has to call) |
![]() |
![]() |
![]() |
#10 |
Junior Member
Join Date: Jan 2006
Location: Robot Hell
Posts: 13
|
I tried the plugin above, and though it has the feature I want, it doesn't give me any flexibility. Everytime I load up winamp, it will start w/ that playlist file. Hence my interest in command driven winamp and batch files, which would allow me to set various parameters for different batches without affecting my original winamp launch shortcut and settings. This way I could have WinampRock.bat, WinampMix.bat with certain options and playlist file.
|
![]() |
![]() |
![]() |
#11 |
Join Date: Sep 2003
Posts: 27,873
|
the only other way i can think of is if using the plugin it's set to a given name but with the bat files you create, you can have a copy command in place to copy the given playlist you want to play to the one defined with the plugin. but that would hinder things for normal use possibly.
i'm having a thought of seeing if the /start could be altered/expanded on to only return once winamp has started (which would fix the delay issue that you need). i'm trying to finish an initial release for another project that's been on the back burner for a while so i'll have a look at the /start alteration possibly tomorrow -daz |
![]() |
![]() |
![]() |
#12 |
Junior Member
Join Date: Jan 2006
Location: Robot Hell
Posts: 13
|
Judging from your plugin expertise, if there's anyone that could make this work it'd be you. Thank you Dr.O and good luck!
|
![]() |
![]() |
![]() |
#14 | |
Junior Member
Join Date: Jan 2006
Location: Robot Hell
Posts: 13
|
Quote:
Here's the batch in case someone's looking to do the same one day... WAall.bat @ECHO OFF wacommand /start ping 1.1.1.1 -n 1 -w 500 wacommand /clear wacommand /random=1 wacommand /repeat=1 wacommand /load WAall.m3u wacommand /next wacommand /play This will start Winamp, toss in a long enough delay so commands will be parsed, clear the playlist, set random and repeat to on, load the m3u file, change the song (so your not always stuck listneing to the first track) and play. Also helps when you change the properites of the bat to "run minimized" so that you don't see the box pop up. Case closed ![]() |
|
![]() |
![]() |
![]() |
#15 |
Join Date: Sep 2003
Posts: 27,873
|
cool
![]() -daz |
![]() |
![]() |
![]() |
#16 |
Forum King, M.D.
|
![]() dro is up late...must be coding ![]() |
![]() |
![]() |
![]() |
#17 |
Join Date: Sep 2003
Posts: 27,873
|
dro has bad insomnia of late and yes, doing some coding as well but you've saved me some time of having to do extra work on WACommand so i'm happy
![]() -daz |
![]() |
![]() |
![]() |
#18 |
Forum King, M.D.
|
well between you making jfte & +++ plugins vs. me googling "batch wait", id say we are even
![]() |
![]() |
![]() |
![]() |
#19 |
Join Date: Sep 2003
Posts: 27,873
|
hehe, well as long as cyfrus has a good solution then i think we're all happy
/me trundles off to try and see if he can sleep now... -daz |
![]() |
![]() |
![]() |
#20 |
Junior Member
Join Date: Jan 2006
Location: Robot Hell
Posts: 13
|
And the final score...
Us 1, Machine 0 ![]() |
![]() |
![]() |
![]() |
#21 |
Junior Member
Join Date: Aug 2021
Posts: 6
|
Hi,
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. |
![]() |
![]() |
![]() |
#22 |
Major Dude
Join Date: Mar 2010
Location: Canada
Posts: 746
|
Try removing the double quotes around %1.
But you don't need WACommand. Winamp responds to its own command-line arguments. You can see them by typing "C:\Program Files (x86)\Winamp\winamp.exe" /? in a command window. This BAT file should do what you want: code: To avoid seeing the command window flash open and close:
Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin |
![]() |
![]() |
![]() |
#23 |
Junior Member
Join Date: Aug 2021
Posts: 6
|
Hi ryerman,
Thanks for your fast reply ![]() I've tried what you said, but it doesn't work. So maybe I'm doing something wrong. First up, I didn't know Winamp also has it's own command-line arguments. So thank you for telling me that. I did what you suggested and typed winamp.exe /? , to see the list with commands. Then I tried the commands you've listed. It works, but strangely enough it opens up a new Winamp, while Winamp is already running...? Why is it doing that? Also, the selected playlist doesn't load in Winamp ![]() And I don't really understand what you mean with, "3. Send your file to the Shortcut." Can you explain me what exactly I need to do? Thank you. |
![]() |
![]() |
![]() |
#24 | |||
Major Dude
Join Date: Mar 2010
Location: Canada
Posts: 746
|
Quote:
Options > Preferences > General Preferences > make sure "Allow multiple instances" is unchecked Quote:
But you say: Quote:
Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin |
|||
![]() |
![]() |
![]() |
#25 | |
Junior Member
Join Date: Aug 2021
Posts: 6
|
Quote:
The shortcut solution with drag and drop works perfectly. Thank you for that ![]() But I would rather like to see this action to start with double clicking (or enter) not with drag and drop. I've also tried to change the command-line argument with you solution, but I've got an error my screen. (see picture) I don't understand why this is happening. It's a shortcut which is part of Windows... Any ideas on that? So I've tried to do something else here. I'm a newbie with Autohotkey and tried to make it in an ahk-script instead of a batch-file. This is my script: code: I've saved with the .ahk extension and modified it in the command-line arguments. Again, same dialog popup. Maybe it has to do something with Winamp itself... I really don't know. So, then I compiled the ahk-script to a standalone exe file. Success! The error is gone, but now, the add %1 problem is back again... ![]() Also I've found that the ahk script is actually a better option, because you don't see anything popping up like when you run a bath-file. Any guys with some knowledge of Autohotkey how to get this to work? Or a solution to get the batch-file to work? Thanks in advance. |
|
![]() |
![]() |
![]() |
#26 |
Forum King
|
i don't have much cmd line exp, but i know i have had a few times when winamp opened multiple instances even tho i did not allow it in prefs. can't recall the circumstances, but i just know it happened... i might even have posted about it.
PENN STATE Radio or http://www.LION-Radio.org/ -- BUG #1 = Winamp skips short tracks Wish #1 = Multiple Column Sorting Wish #2 = Add TCMP/Compilation editing |
![]() |
![]() |
![]() |
#27 | |
Major Dude
Join Date: Mar 2010
Location: Canada
Posts: 746
|
Quote:
But if you were able to execute the BAT file, but not the Shortcut, then modify the BAT file so that it executes minimized. Maybe this helps: https://stackoverflow.com/questions/...om-my-bat-file It sounds like you might be messing around in the Windows Registry. If you give a detailed explanation of all the modifications you made that led to the error screen, maybe I can reproduce it and then investigate. But if it was me, I would add the Shortcut to the "Send to" menu. https://www.howtogeek.com/howto/wind...-send-to-menu/ I don't know how to use Autohotkey. Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin Last edited by ryerman; 24th August 2021 at 22:25. |
|
![]() |
![]() |
![]() |
#28 | |
Major Dude
Join Date: Mar 2010
Location: Canada
Posts: 746
|
Quote:
code: Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin |
|
![]() |
![]() |
![]() |
#29 | |
Junior Member
Join Date: Aug 2021
Posts: 6
|
Quote:
Thank you for all your efforts ![]() Here are some answers to your questions. Yes, the batch-file actually worked, but I see that popup screen from the batch-file. A shortcut to it, give me an error like I said in my previous post. Your tip about executing the bat file minimized might perhaps work. I must admit, my knowledge about the commands in CMD are very basic, so I didn't know that was even possible. Is what I am doing modifying the Registry? Yes and no. Yes, I modify the command to open, or in this case play a playlist (or music file). Till now, I haven't modified the play command at all. Instead I made a second command and called it "Test". I have been testing this out, to see if it works or not. So yes, it's basically a change you make that is stored in the Registry. However, I don't mess around in the Registry myself, unless I'm really sure and know what I'm doing. If not, it could in worst case scenarios make your system unstable. Instead, like I said before, I'm using a program which I'm using now for almost a decade that can adjust al those things, without you actually have to go in Registry itself. It's called "FileTypesMan" from NirSoft. I don't know if I can mention this software here, otherwise you have to edit my post. If you want to try it yourself (or anyone else), here is his site https://www.nirsoft.net/utils/file_types_manager.html I've been using some other programs from this developer as well, which has served me good in the last few years ![]() |
|
![]() |
![]() |
![]() |
#30 | |
Junior Member
Join Date: Aug 2021
Posts: 6
|
Quote:
I will check it later, when I have so more time. |
|
![]() |
![]() |
![]() |
#31 | |
Major Dude
Join Date: Mar 2010
Location: Canada
Posts: 746
|
Hi DJ_Coy
Quote:
But I've never created and tested context menu commands: that was a good idea. ![]() So I added a command for M3U files, using my BAT file (see above) in the command line. When clicking on the new context menu entry in File Explorer, the BAT file does its job without a "pop-up screen" of the command window. There's a quick "open and close" in the Taskbar, but that will never be avoided without different scripting techniques. I can only conclude that you are doing something differently than I am. And fyi, the batch file fails if Winamp is closed when it is executed. I haven't figured out why. Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin |
|
![]() |
![]() |
![]() |
#32 |
Junior Member
Join Date: Aug 2021
Posts: 6
|
I use FileTypesMan quite a lot.
Did you know, you can even if you want to set a command to the "default action" of that file. When you right click on a file and see the context menu the default action is in bold. So when you press enter or double click it, that action will be executed ![]() Anyway... I've tried and tried again. The script just doesn't work ![]() Just when I wanted to post this and almost gave up, I tried something else. I've put the batch file in the same directory where my m3u files are stored. And guess what... it's working now. Is it possible that you can modify your batch file so I can store it in an other location? That would be very handy... I have one folder with all my scripts and macro's and so on. I know, I'm asking you a lot ![]() Just to get some things straight here:
One other thing came to mind. Is there even a setting in the Preferences in Winamp where you can set Shuffle and/or Repeat in ON/OFF for a desired file type? I never really asked that in first place... sorry. I haven't seen any setting like this. Maybe you have? And finally. I know you've done all this with winamp.exe, but I've noticed a few days ago when I was testing, that the WACommand actually loads the playlist faster... Any chance in changing your script with that command? ![]() Anyway, thank you so much for your help! ![]() I've would never found a way to get this to work. |
![]() |
![]() |
![]() |
#33 | |||
Major Dude
Join Date: Mar 2010
Location: Canada
Posts: 746
|
Quote:
You can see in the screenshot (attached above) that the batch file is stored on my W:\ disk. Like you, I store all my scripts and batch files in one place. The M3U file is on a different disk. Winamp, the batch file and the M3U file are completely separate, each on a different disk. I expect that it doesn't matter, as long as they are correctly addressed by their complete file specification. Sometimes, an M3U file is created so that the file paths that it contains are relative to the M3U file, not absolute paths. Make sure your M3U file contains absolute paths to the audio files. Quote:
AFAIK, the Playlist Editor settings apply to all file types and cannot be configured differently for each type. Quote:
![]() I don't have a copy of WACommand, or I would test and experiment. But you can probably modify the script yourself by replacing the Winamp commands with the appropriate WACommand commands. If you want, you can post a zip archive containing the batch file, a typical M3U file, a WACommand installer and a screenshot of the action in FileTypesMan. (I want the M3U file to check its format. I know the tracks won't exist on my computer.) I can then try and reproduce your experience. You're welcome. ![]() Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin |
|||
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|