How to Start and Control Netscape Navigator

If you want to include a link to a web page and you want Netscape Navigator to do it you may want to look at this code. This should work with Netscape Navigator. This function has not yet been tested with Netscape Navigator 6.0.

uses
  DDEMan, Registry;
...
procedure StartNetscape(const sURL: string);
const
  sNETSCAPE = 'Netscape';
var
  sLocation: string;
begin
  with TRegistry.Create do
    try
      RootKey := HKEY_CLASSES_ROOT;
      if OpenKeyReadOnly(sNETSCAPE + 'MarkupprotocolStdFileEditingserver') then begin
        sLocation := ReadString('');
        CloseKey;
      end;
    finally
      Free;
    end;

  with TDDEClientConv.Create(nil) do
    try
      { The location of Netscape Navigator }
      ServiceApplication := sLocation;
      { Activate Netscape Navigator }
      SetLink(sNETSCAPE, 'WWW_Activate');
      RequestData('0xFFFFFFFF');
      { Go to the specified URL }
      SetLink(sNETSCAPE, 'WWW_OpenURL');
      RequestData(sURL + ',,0xFFFFFFFF,0x3,,,');
      CloseLink;
    finally
      Free;
    end;
end;

Example: StartNetscape(’http://www.m3Rlin.org‘);

No Comments Yet

You can be the first to comment!

Leave a comment

OpenID Login

Standard Login