PDA

View Full Version : How to delete the current song from Winamp Playlist



jediperry
October 13th, 2002, 12:55 PM
You can use the send message plugin.

wm_user is 1024 I think.

Mike

Wykat
October 13th, 2002, 12:55 PM
Is it also possible to physically remove the current playing song from the hard disk ? I get a lot of MP3's which I want to remove if I don't like them.

rgrds,
Wykat

cranky
October 13th, 2002, 12:55 PM
I hate making playlists. Personally I rather drop a whole bunch of music into a playlist and delete what I don't like as I go along. Unfortunately it requires three manual moves none of which can be easily simulated by girder. After some poking prodding and asking the right people, I have two lines of code that make it possible:

#include "stdafx.h"

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
HWND hPLWnd = FindWindow("Winamp PE",NULL);
SendMessage(hPLWnd,WM_USER,104,SendMessage(hPLWnd, WM_USER,100,0));
return 0;
}

Notice that these are WM_USER messages and they are sent to the Winamp PE (playlist editor) window. I have compiled and tested this code and it works beautifully. Just need to figure out how to force winamp to save the current playlist =].

I will release exported group and a exe or plugin to accomplish this as soon as I figure out how to make VC++ not bind every library under the sun into the exe (153KB atm).

In the mean time is there an easy way to send WM_USER messages to a window instead of WM_COMMAND messages from girder?

cranky
October 13th, 2002, 12:55 PM
W000t!

Thanks mike.

WM_USER is 1024
WM_COMMAND is 273

so if anyone else wants to add this (what I feel is) useful feature do the following:

Make sure SendMessage (1.51?) is enabled.

create a multi-group
add a command to the multigroup and select the SendMessage plugin:
Name the command Get Current Song Index
Message Number: 1024
wParam: 100
iParam: 0
check save result in girder register and select 5 (or whatever floats your boat)
click ok

In the new multi-group create a second command in girder and select the SendMessage plugin
Name the command Delete Song From Playlist
Message Number: 1024
wParam: 104
lParam: [reg5]
click ok

create one last command in the multi-group and select the command tab
Name the command Next
Select Command from the drop down menu
wParam 40048
lParam 0
select apply

Then just learn the event from your remote and your good to go. I have wanted a hotkey like this for winamp for ages, now I have it and its every bit as useful as I thought it would be =].

Dada
October 13th, 2002, 12:55 PM
thx a lot, this really is a nice new feature :smile:

Though u need another Button as a TAB-Key for getting into the file-list of the directory, but i don't care about that.

greets,
dada