|
¿Cómo saber la URL en el navegador?
Hola a todos.
encontre este codigo
function TForm1.GetURL_IE: string;
var
hIeWindow, hWorkerA, hToolbar, hComboBoxEx,
hComboBox, hEdit: hWnd;
Buffer: array[0..255] of Char;
begin
hIeWindow := FindWindow('IEFrame', nil);
if hIeWindow 0 then
begin
hWorkerA := FindWindowEx(hIeWindow, 0, 'WorkerA', nil);
hToolbar := FindWindowEx(hWorkerA, 0, 'RebarWindow32', nil);
hComboBoxEx := FindWindowEx(hToolbar, 0, 'ComboBoxex32', nil);
hComboBox := FindWindowEx(hComboBoxEx, 0, 'ComboBox', nil);
hEdit := FindWindowEx(hComboBox, 0, 'Edit', nil);
Sendmessage (hEdit, WM_GETTEXT, Length(Buffer), Longint(@Buffer));
Result := String(Buffer);
end
else
begin
Result := ' ';
end;
pero me da error cuando pregunta en el if hIeWindow 0 then
si pueden me ayudan me da error gracias a
todos por colaborar con sus respuestas.
|