Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Using "excecute file" to open a website

Author
Message
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 16th Mar 2006 03:40
I need to make it open a website when a button is clicked on my menu. I had it working by saving the website to my harddrive, then using this saved website in my "excecute file" command. However, I now need to open a website that it not up on the internet yet, and won't be up until I complete this program. I tried creating an internet shortcut, and then directing my "excecute file" command to the internet shortcut, but it just gives me a "file excecution failed" error and exits. Any idea how I could do this? thanks

Xander Moser - Bolt Software - Firewall
nojbox87
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: England
Posted: 16th Mar 2006 10:48
http://forum.thegamecreators.com/?m=forum_view&t=73996&b=10
and just link the code to whatever web page you want.

I am a Christian and I know that God loves me. That is what makes my life so great!
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 19th Mar 2006 20:34
I personally would just make a HTML file on your hard drive that redirects to another one...

(this way, you're not screwing your users into using one browser (in the example, internet exploder))...




And friends. Etc

... installing gentoo ...
nojbox87
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: England
Posted: 20th Mar 2006 13:30
how would you run that html file then without saying what program to open it with im guessing there is a command that i need to use

I am a Christian and I know that God loves me. That is what makes my life so great!
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 20th Mar 2006 20:37
Cool, thanks a lot guys. I think I'll try blanky's method. Seems more suited to opening my page. I don't know that much html, thanks for the code!

Xander Moser - Bolt Software - Firewall
nojbox87
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: England
Posted: 20th Mar 2006 20:39
ok but can u tell me how to run the html code without specifying a program which to open it with?

I am a Christian and I know that God loves me. That is what makes my life so great!
John Y
Synergy Editor Developer
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 21st Mar 2006 15:04
To open a file using it's default file association. Try

execute file "rundll32 SHELL32.DLL,ShellExec_RunDLL http://www.google.com","",""

It works in Java, but not sure if DBC will like it (I don't have access to DBC at the moment).

nojbox87
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: England
Posted: 21st Mar 2006 15:51
ok thx ill give it a try alter when i have acess to DBC lol

I am a Christian and I know that God loves me. That is what makes my life so great!
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 25th Mar 2006 14:51
You can just execute a _local_ html file directly, by using execute file.

... installing gentoo ...
nojbox87
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: England
Posted: 25th Mar 2006 19:23
can u give a code example? not sure i understand ghor to use it.

I am a Christian and I know that God loves me. That is what makes my life so great!
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 26th Mar 2006 21:31
Just make an html file in the same folder as your source code, and paste this into it (but insert the desired url into the html...):



Now in your program use the excecute file command to excecute the html file that you just saved, simple as that.

Xander Moser - Bolt Software - Firewall
nojbox87
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: England
Posted: 27th Mar 2006 14:21
oh ok thanks

I am a Christian and I know that God loves me. That is what makes my life so great!

Login to post a reply

Server time is: 2025-05-23 19:16:49
Your offset time is: 2025-05-23 19:16:49