System Delphi

Title: Controling Winamp from a Dll or Application
Question: Once i found a Mirc script wich was able to control Winamp (i never thought that that is possible). After a few weeks i found bugs in that script. So i thought about making my own script. But how? After a few Hours i found the way into Winamp and now if someone want to do the same here is the way in.
Answer:
uses
Messages;
function My_Cool_Function1_Name():Boolean;
var
hwndWinamp : THandle;
begin
hwndWinamp := FindWindow('Winamp v1.x', nil); // 1st step
SendMessage(hwndWinamp,WM_COMMAND,40058,0); // 2nd step
Result := True;
end;
means...
1st we get the Handle of Winamp
2nd we send a message to Winamp with one of the specified codes (40058 = Increase Volume)
3rd we have fun with the function .)
If you want to send a WM_USER mesage to Winamp use something like this:
uses
Messages;
function My_Cool_Function2_Name():Boolean;
var
hwndWinamp : THandle;
begin
hwndWinamp := FindWindow('Winamp v1.x', nil);
SendMessage(hwndWinamp,WM_USER,0,120);
Result := True;
end;
120 = save the current playlist to Winampdir\winamp.m3u
If Winamp issn`t running the messages run to /dev/null .)
For the Control Codes go to http://www.winamp.com/nsdn/winamp2x/dev/sdk/api.jhtml
It`s the first time i send an Article so don`t shoot me .)