0 Members and 1 Guest are viewing this topic.
HWND h=FindWindow("Winamp v1.x",NULL);char s[256];int slength;slength = GetWindowText(h, s, 256);
function tread:boolean; var buff:string; amp:HWND; begin amp:=findwindow('Winamp v1.x', nil); while true do begin sleep(updateTime*1000); if buff <> GetText(amp) then begin buff:=GetText(amp); update(UTF8Encode(parse(prefix+buff))); end; end; end;
Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
function GetText(hEdit: HWND): String; var buffer: array[0..1024] of Char; buf1:string; begin SendMessage(hEdit, WM_GETTEXT, SizeOf(buffer), Integer(@buffer)); buf1:=copy(buffer,pos('.',buffer)+1,pos(' - Winamp',buffer)-(pos('.',buffer)+1)); Result := buf1; end;
*** 06. Title - Winamp6. Title - Winamp
function GetModuleFileNameString(Instance: THandle): string; var buffer: array [0..MAX_PATH] of Char; begin GetModuleFileName(Instance, buffer, MAX_PATH); Result := buffer; end;
IniPath := ExtractFileDir(GetModuleFileNameString(0));IniFile := TIniFile.Create(IniPath + 'Plugins\gen_vkstatus'+'.ini');
//C++IniFile = new TIniFile(ExtractFilePath(Application->FileName())+"PlugIns\\gen_vkstatus.ini");