Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 25th July 2003, 10:27   #1
Ganymed
Junior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 40
Insert/Delete/Move/Replace Track in Playlist

Hi!

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?

Thanx

Ganymed
Ganymed is offline   Reply With Quote
Old 25th July 2003, 23:11   #2
popatr
Junior Member
 
Join Date: Aug 2002
Posts: 33
Ganymede,
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.
popatr is offline   Reply With Quote
Old 28th July 2003, 13:32   #3
Ganymed
Junior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 40
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?
Ganymed is offline   Reply With Quote
Old 28th July 2003, 15:17   #4
popatr
Junior Member
 
Join Date: Aug 2002
Posts: 33
HwndPe=FindWindow("Winamp PE", "Winamp Playlist Editor");

or, to use the api--and therefore ensure future compatability--do this

HwndPe=(HWND)SendMessage(hwnd_winamp,WM_WA_IPC,IPC_GETWND_PE,IPC_GETWND);

Both of these work even when the playlist is not there.
popatr is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump