Autor Beitrag
DELPHIn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

Windows Vista
Delphi 2007 für Win 32 Prof.
BeitragVerfasst: Fr 07.04.06 08:24 
Hallo,

mit folgendem Code lese ich die geöffnete Seite aus dem FireFox-Browser aus.

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:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
procedure TFormFavImport.GetCurrentFirefoxURL(out URL, Title: string);
  var
  DDEClient : TDDEClientConv;
  p, q : PChar;
  i : Integer;
begin
  URL := '';
  Title := '';
   DDEClient := TDDEClientConv.Create(nil);
   try
     with DDEClient do
       if SetLink('FireFox', 'WWW_GetWindowInfo') then
         p := RequestData('0xFFFFFFFF')
       else
         exit;
     if Assigned(p) then
     try
       q := p;
       Assert(q^ = '"');
       SetLength(URL, StrLen(q));
       Inc(q);
       i := 0;
       while q^ <> '"' do
       begin
         if (q^ = '\') and (q[1] = '"') then
           Inc(q);
         Inc(i);
         URL[i] := q^;
         Inc(q);
       end;
       SetLength(URL, i);
       SetLength(Title, StrLen(q));
       i := 0;
       Inc(q, 3);
       while q^ <> '"' do
       begin
         if (q^ = '\') and (q[1] = '"') then
           Inc(q);
         Inc(i);
         Title[i] := q^;
         Inc(q);
       end;
       SetLength(Title, i);
     finally
       StrDispose(p);
     end
     else
       exit;
   finally
     DDEClient.Free;
   end;
end;


Das funktioniert aber nur für den gerade sichtbaren Tab.
Nun komme ich einfach nicht dahinter, wie ich alle geöffneten Tabs der Instanz auslesen kann.
Gibt es da eine Möglichkeit?

Danke

_________________
DELPHIn
=> Errare humanum est