Delphide "WebBrowser" ve "InternetExplorer.Application" yöntemleri yerine ben tarayıcı olarak mozilla firefox kullanıyorum, ShellExecut yöntemiyle firefox aktif hale geliyor buraya kadar sorun yok, açılan sayfadaki tüm urlri memoya aktarma istiyorum fatak "J := IE.document.links.length" itibaren kodlamada hata alıyorum...
Verilen Hata:
with message 'Invalid variant operation'. Process Browser.exe (4320)
Kod: Tümünü seç
procedure TForm8.AraClick(Sender: TObject);
var
I, J: Integer;
IE: Variant;
Link: String;
begin
ShellExecute(0, 'open', 'Firefox.exe',
Pchar('https://www.google.com.tr/search?q=' + 'araba'), '', SW_Normal);
begin
Sleep(3000);
Application.ProcessMessages;
J := IE.document.links.length;
for i := 0 to J - 1 do
begin
Link := IE.document.links.item(I);
Memo1.Lines.Add(IE.document.links.item(I));
end;
end;
end;