Page 1 of 1

open tab in firefox

Posted: Wed Sep 15, 2010 4:55 pm
by Brujah
I would like to open the homepage of my program in firefox when my program is started.
How would I achive this?

Re: open tab in firefox

Posted: Wed Sep 15, 2010 5:02 pm
by TomS

Code: Select all

RunProgramm("http://yourwebsite.tld")

Re: open tab in firefox

Posted: Wed Sep 15, 2010 5:02 pm
by Innesoft

Code: Select all

RunProgram("http://www.blah.com/")
Edit: damn too slow :|

Re: open tab in firefox

Posted: Wed Sep 15, 2010 5:05 pm
by TomS
Innesoft wrote:Edit: damn too slow :|
Don't you worry. It's not a competetion ;)

Re: open tab in firefox

Posted: Wed Sep 15, 2010 6:42 pm
by blueznl
... then, in his next mail, he'll say: "... but I was still faster :-)"

Re: open tab in firefox

Posted: Wed Sep 15, 2010 7:54 pm
by #NULL
open tab in firefox
you can explicitly open the URL in a new tab or a new window with firefox.

Code: Select all

RunProgram(GetEnvironmentVariable("ProgramFiles")+"\Mozilla Firefox\firefox.exe", "-new-tab " + "http://www.purebasic.com", GetCurrentDirectory())
RunProgram(GetEnvironmentVariable("ProgramFiles")+"\Mozilla Firefox\firefox.exe", "-new-window " + "http://www.purebasic.com", GetCurrentDirectory())
but before, make sure firefox exists on the computer in that directory.
I would like to open the homepage of my program...
for that purpose it's better to do it like the others have shown, because it will use the users default browser.

Re: open tab in firefox

Posted: Thu Sep 16, 2010 8:19 pm
by Brujah
Thanks for the fast replies.
I just tried it and it basically works.
It opens a new tab in my firefox and displays the page
BUT
my game is not working properly anymore.
Somehow the buttons of the titlescreen are screwed.
I have no clue yet what causes this.

The sourcecode is freely available.
So if somebody likes to try just get it from the laby sourceforge page.
Its in the subversion there.
http://sourceforge.net/projects/lostlaby/

Just add the above call somewhere before the main loop in laby.pb and you will be able to reproduce it.