View Full Version : Insert/Delete/Move/Replace Track in Playlist
25th July 2003, 10:27
Has anyone an idea how to insert a track on a certain position into the playlist? Just adding a file (via WM_COPYDATA) inserts the fila at the end of the playlist...
Is there any method to delte/move/replace a certain track? With SendMessage(hwndWinamp, WM_USER, x, 121) I can select any track, but how can I delte or move it?
25th July 2003, 23:11
Select the track and then simulate the user keystrokes that lead to the desired action. (I think that will work but I'm not sure.) So, for deleteing, you would SendMessage(HwndPe, WM_KEYDOWN, 0x00ff, somejunkhere), and a corresponding Keyup message. This should simulate the user pressing the delete key--to find out what should go in the place of "somejunkhere", spy on the messages of some app while you press delete, I'm too lazy to do it right now.
For moving send a message to simulate the up or down arrow keys with the alt key pressed- (holding the alt key is part of bits in "somejunkhere") Pressing up and down with alt held moves the song. Just calculate the number of times to move the song, then repeat the message that many times.
28th July 2003, 13:32
Yeah, I thought of doing something like that. But how to get the playlist's handle? Ok, I'll use the FindWindow()-method, but what parameters?
And will that work when the playlist is turned off?
28th July 2003, 15:17
HwndPe=FindWindow("Winamp PE", "Winamp Playlist Editor");
or, to use the api--and therefore ensure future compatability--do this
Both of these work even when the playlist is not there.
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.