#4 Allow URL as a commandline ArgStr

closed
nobody
None
3
2002-08-09
2002-07-24
sf
No

Most web browser have the ability to be started from the
command with a URL as an arguement.
e.g
c:\camerashy.exe www.cnn.com
or if URL contains white space then enclose within
double quotes.
e.g
c:\camerashy.exe "www.somesite.com/stego/page
name with spaces.html"

The browser would thus open a window at that URL
intead of the default homepage.

This is at times can be a useful feature.
e.g
Allows scripted automation of CameraShy process start
on a chosen URL.
e.g
Allows CS to be used the default browser option in 3rd
party applications such as Copernic search engine.

I believe that the code snippet below contains the minor
modification to the sourcecode that is required to enable
this feature in CS.

//*******start code snippet*****************

procedure TForm1.FormShow(Sender: TObject);
begin
webbrowser1.AssignDocument;

try begin
//accept URL as command line parameter for a
startpage

webbrowser1.go(ParamStr(1)) ;
end
except
//if no parameter string found then use default IE
Homepage

webbrowser1.GoHome;
end;

IETravellog1.Connect;

end;

//******* end code snippet****************

Discussion

  • sf

    sf - 2002-07-25
    • priority: 5 --> 3
     
  • thePull

    thePull - 2002-08-09

    Logged In: YES
    user_id=36206

    code doesn't work, help me out here, wiz

     
  • thePull

    thePull - 2002-08-09

    Logged In: YES
    user_id=36206

    fixed

     
  • thePull

    thePull - 2002-08-09
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks