Opening Internet Explorer when program ends?

Blitz3D Forums/Blitz3D Programming/Opening Internet Explorer when program ends?

gameproducer(Posted 2004) [#1]
Hi folks. I'm familiar with command:
Exec "www.google.com" 


But as my program runs in windowed mode people can press the small X on top right corner to close the window and then my program won't open a new internet window.

Is it possible to launch web browser also when user clicks that small X to close the window?


semar(Posted 2004) [#2]
Make a .bat file with two line statements.

The first statement calls your program, the second call IE when your program has been closed.

Example: create test.bat with this two lines:

calc
"C:\Program Files\Internet Explorer\iexplore.exe" www.google.com

Run it. Calculator will appear. Close calculator, and IE will be ran.

You may change the IE path accordingly with your pc though.

Hope this helps,
Sergio.

P.S.
I'm quite sure you can trap the window close event if you use Blitz Plus.


Beaker(Posted 2004) [#3]
Alternatively there is a function in the code archive to capture the X being clicked.


GfK(Posted 2004) [#4]
Just a word of caution - people generally don't like being forced to visit websites every time they close your game/app.


gameproducer(Posted 2004) [#5]
Yeh, found it. Thanks!
http://www.blitzbasic.com/codearcs/codearcs.php?code=832