Autor Beitrag
snoopyonline
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Mi 12.01.05 18:03 
Ich habe mir die Tmozillabrowser-Komponente heruntergeladen und versuche gerade einige meiner alten Twebbrowser-Programme umzustellen...
Das klappt (wie von den Entwicklern der Mozilla-Komponente versprochen) auch weitestgehend ganz gut. Nur bei dem Versuch, die in der geladenen Seite vorhandenen Links auszuwerten und aufzulisten scheitert die ganze Sache...

ausblenden volle Höhe Delphi-Quelltext
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:
27:
28:
29:
30:
31:
uses ...  MSHTML_TLB ...; 


procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject; 
  const pDisp: IDispatch; var URL: OleVariant); 
var 
document: IHTMLDocument2; 
allLinks: IHTMLElementCollection; 
thisLink: IHTMLElement; 

begin 
edit1.Text := webbrowser1.LocationURL; 
form1.Caption := webbrowser1.LocationName; 

if checkpage then 
begin 
listbox1.Clear; 
try 
document := WebBrowser1.Document as IHTMLDocument2; 
allLinks := document.Links; 
for run := 0 to Document.links.Length - 1 do 
begin 
thisLink := allLinks.Item(run,'') as IHTMLElement; 
buffer := thisLink.toString; 

 if pos('//',uppercase(buffer)) <> 0 then Listbox1.Items.Add(buffer); 
end; 
except end; 
end; 

end;


An der Stelle buffer (= string) := thislink.tostring steigt das Programm mit der Meldung aus: "Nicht implementiert"...

Hat jemand ne Ahnung wo das Problem liegt oder vielleicht schon so ne Link-Auflistung im TMozillabrowser programmiert??

Moderiert von user profile iconTino: Code- durch Delphi-Tags ersetzt.
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mi 12.01.05 18:07 
Die Fehlermeldung sagt doch schon alles: "Nicht implementiert".

Ich wär auch gern von TWebBrowser auf TMozillaBrowser umgestiegen schon wegen der Linux-Sache (geht das überhaupt? Ich bin da ja immer noch skeptisch, weil beides ActiveXe sind!), aber da der Zugriff aufs DOM ein wesentlicher Bestandteil des Programms und eben jener (noch) nicht im TMozillaBrowser implementiert ist, war das nichts.

raziel

_________________
JSXGraph
r4id3n
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 115

Win XP Home, Win XP Pro
D6 Prof, D7 Ent, K3 Ent
BeitragVerfasst: Do 13.01.05 09:50 
Lass dir den HTMLText geben ...
Dann schau dir mal meinen Parser an, damit sollte es gehen!
www.delphi-forum.de/...ectParser_34217.html
snoopyonline Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Fr 14.01.05 12:22 
Tja, die Idee, das ganze Problem mit nem Parser zu lösen hatte ich auch schon...
Die Sache hat nur zwei Haken, bei denen mir vielleicht jemand weiterhelfen kann:

1. Das Runterladen und anschließende parsen will bei ".php"-Adressen meist gar nicht so richtig funktionieren.

2. wie bekomme ich wirklich ZUVERLÄSSIG den Pfad (also root) der aktuellen Seite heraus? Bei meinen bisherigen "Adresse-an-einer-bestimmten-Fundstelle-des-Zeichens-/-teilen"-Kostruktionen funktionieren vielleicht bei 60% der Adressen. Der Rest hat irgendwelche Zeichen zuviel oder zuwenig.
Und was nützen mir die geparsten RELATIVEN Link-Angaben, wenn ich keinen Root-Wert habe um diese zu einer ABSOLUTEN Http-Adresse zusammensetzen zu können. Die "Linkliste" im Webbrowser besteht ja schließlich nur aus absoluten Adressen..
Oder ergänzt der oben genannte Parser die Adressen etwa automatisch?
DelphiTA
Hält's aus hier
Beiträge: 3


Kylix 3 Enterprise on Linux Fedora Core 2
BeitragVerfasst: Do 20.01.05 17:42 
Hi All,
I'm an italian coder and my english is very bad. Today i've installed Kylix 3 on my Linux Machine but i can't find the TMozillaBrowser component. Where i can download it?

Thanks for all replies :wink:
snoopyonline Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Fr 21.01.05 14:16 
@DelphiTA

I don't know if they offer the Mozilla ActiveX Control also for Linux+Kylix but you should have a look at:
www.iol.ie/~locka/mozilla/mozilla.htm
This is the Mozilla Project's Website where i have got my Windows+Delphi-Version from...

And many other sites on that topic:
www.google.de/search...la+activex&meta=
DelphiTA
Hält's aus hier
Beiträge: 3


Kylix 3 Enterprise on Linux Fedora Core 2
BeitragVerfasst: Fr 21.01.05 14:33 
Thanks but all files are .exe and under linux i can't start an executable winfile :(
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Fr 21.01.05 15:11 
How Borland embedded Mozilla in Kylix 2 - by Darren Kosinski

bdn.borland.com/arti...0,1410,28199,00.html
DelphiTA
Hält's aus hier
Beiträge: 3


Kylix 3 Enterprise on Linux Fedora Core 2
BeitragVerfasst: Sa 22.01.05 05:54 
yeah! Is Good. Thanks, i read all the document tomorrow, now i am going to bed :wink:
JoelH
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Mi 16.03.05 11:31 
Titel: hmm,
ist
ausblenden Delphi-Quelltext
1:
2:
3:
 

buffer (= string) := thislink.innerText;


was du suchst? Es gibt da noch weitere Dinge die Via String zurückgegeben werden.

_________________
mfg. Joel