|
|
#1 |
|
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 |
|
|
|
|
|
#2 |
|
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. |
|
|
|
|
|
#3 |
|
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? |
|
|
|
|
|
#4 |
|
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. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|