1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
//merci a graf
fito
procedure TForm1.Button2Click(Sender: TObject);
var hiExplorer,ClientWork,Toolbar,ComboBox,ComboBoxChild,Edit:HWND;
wnd: HWND ;
i,Len:integer ;
result:array of char ;
s : string ;
begin
hIExplorer := FindWindow('IEFrame',nil);
//SetForegroundwindow(hIExplorer) ;
//Handle de la fenêtre de travail
ClientWork:=FindWindowEx(hiExplorer,0,'WorkerA',nil);
if ClientWork=0 then //Compatibilité XP / 98
ClientWork:=FindWindowEx(hiExplorer,0,'WorkerW',nil);
// Handle de la ToolBar (casert pas)
Toolbar:=FindWindowEx(ClientWork,0,'ReBarWindow32',nil);
// Handle du ComboBox
ComboBox:=FindWindowEx(Toolbar,0,'ComboBoxEx32', nil);
ComboBoxChild:=FindWindowEx(ComboBox,0,'ComboBox',nil);
// Cherche le Handle du Edit
Edit:=FindWindowEx(ComboBoxChild,0,'Edit',nil);
//envoie les messages pour récupérer la longueur de l'URL
Len:=SendMessage(Edit,WM_GETTEXTLENGTH,0,0)+1;
// récupère l'URL (mais c'est juste pour le fun) |
Partager