I would like to open the homepage of my program in firefox when my program is started.
How would I achive this?
open tab in firefox
Re: open tab in firefox
Code: Select all
RunProgramm("http://yourwebsite.tld")Re: open tab in firefox
Code: Select all
RunProgram("http://www.blah.com/")Re: open tab in firefox
Don't you worry. It's not a competetionInnesoft wrote:Edit: damn too slow
Re: open tab in firefox
... then, in his next mail, he'll say: "... but I was still faster
"
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: open tab in firefox
you can explicitly open the URL in a new tab or a new window with firefox.open tab in 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())for that purpose it's better to do it like the others have shown, because it will use the users default browser.I would like to open the homepage of my program...
Re: open tab in firefox
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.
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.


