communicating with winamp

norg

New member
Joined
Sep 11, 2006
Messages
2
Programming Experience
1-3
hey there
i'm trying to do something for which i cant find any useful information on the web. i need a way for my application to communicate with winamp, in order to queue files into it. so far i've had no luck with looking it up, if anyone has some directions (or preferably a working code example...) i'll be very, very grateful.

thanx ahead!!
 
s/he's probably making a playlist management program where s/he'd have hte playlists in his/her program and this program would "Enqueue" the songs in winamp

i'm not sure how that would be done, but i'm curious to figure it out too, i might have time this weekend to look into it
 
some progress

ok, so i've had a little sit-down on the matter, and now the situation is this:
i can create an .m3u (or .pls or any other format) pretty easily, i just have to write the full paths of the files i want into an "*.m3u" file. now, the question that remains is how can i open this file using winamp (through my app of course) - is there a certain command that opens files with their associated program, or another indirect way of doing so (sending a command to the console?).

will appreciate any ideas...
have a good weekend!!
 
Use this:

VB.NET:
        Dim p As New Process()

        p.Start("c:\Playlist.m3u")

Back in VB6 we used ShellExecute API but the above works with .NET.
 
you can probably also do this (in case winamp is not the default mp3 player):
VB.NET:
System.Diagnostics.Process.Start("C:\Program Files\Winamp\Winamp.exe", "Your playlist file location")


again this might not be correct, but that's only if winamp is installed to a different location

maybe this weekend i'll look into enqueueing mp3's directly into winamp
 
The playlist option is easy and good to build a new full playlist and start playing it.

If you want to Enqueue a song to an existing and playing playlist, same as using the Enqueue context menu in Explorer, I found some info in registry. The context menues for Winamp is in "HKEY_CLASSES_ROOT\Applications\Winamp.exe\shell" and the "\Enqueue\command" give you the installed executable path with commandline parameters needed. At my system this displays
"C:\Program Files\Winamp\Winamp.exe" /ADD "%1"
The %1 parameter here represent the song filename.

If you Enqueue when WinAmp is not already playing it won't auto-play, so you could check processes for existing WA process first, and-if-not start first mp3 as process instead of ADD.
 
couldnt we use System.Diagnostics.Process( "C:\Program Files\Winamp\Winamp.exe", "/ADD "" & txtFileName.Text & "") and have windows start winamp and enqueue the mp3 file?

if i remember correctly, that's how explorer (windows) does it
 
That's what I just said :)
 
Back
Top