This is built on the great work of giants.. i just put it together..
slight quirk: the remove missing file works only after such a long sleep
and does not in windowshade mode.. any help appreciated, esp. from VxE
#del:: ;Delete currently playing track from disk (Winamp)
CurrentSongPath := GetWinampTrackInfo("path")
PostMessage, 0x111,40048,,,ahk_class Winamp v1.x ;Plays next song
FileRecycle, %CurrentSongPath% ;Recycle song
sleep 10000
IfWinExist, ahk_class BaseWindow_RootWnd
ControlSend,Winamp Playlist Editor,!{DEL} ;Remove missing files from playlist
return
GetWinampTrackInfo( Mode="Title", Track="Current" )
{ ; Function by [VxE]. Version 0.1
Window = ahk_class Winamp v1.x
Message = 211
SendMessage, 0x400, 0, 125, , %Window%
IfEqual, ErrorLevel, Fail, Return
IfEqual, Track, Current, SetEnv, Track, %errorlevel%
Else EnvSub, Track, % Track > 0
If InStr(Mode, "t") = 1
message += 1
SendMessage, 0x400, %Track%, %message%,, %Window%
index := errorlevel
winget, pid, PID, %Window%
hProcess := DllCall("OpenProcess","Int",16,"Int",0,"UInt",pid)
VarSetCapacity(MVALUE,1,0)
Loop, 255 ; can be bigger if truly necessary
{
DllCall("ReadProcessMemory","UInt",hProcess
,"UInt",index+A_Index-1,"Str",MVALUE,"UInt",1,"UInt *",0)
IfEqual, MValue,, Break ; null terminate string
str .= MValue
}
DllCall("CloseHandle", "UInt", hProcess)
return %str%
}