I need to catch the url of the active webpage; with this code I
obtain the url plus the title and I need only the url
uses
ddeman;
function GetURL(Service: string): string;
var
ClDDE: TDDEClientConv;
temp: PChar;
begin
Result := '';
//create a new DDE Client object
ClDDE := TDDEClientConv.Create(nil);
with ClDDE do
begin
SetLink(Service, 'WWW_GetWindowInfo');
temp := RequestData('0xFFFFFFFF');
Result := StrPas(temp);
StrDispose(temp);
CloseLink;
end;
ClDDE.Free;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
// the result should be something like:
// "http://www.swissdelphicenter.ch","SwissDelphiCenter.ch"
ShowMessage(GetURL('IExplore'));
{ ShowMessage(GetURL('Netscape')); }
end;
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/delphi-en/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/