OpenUrl not working?

BlitzMax Forums/BlitzMax Programming/OpenUrl not working?

Kemi(Posted 2006) [#1]
In my game, compiled for Windows, the OpenUrl("http://www.zhanggames.com") is doing nothing.

When I compile for Mac OS X, it works fine.

Any ideas?


Dreamora(Posted 2006) [#2]
No default browser set possibly?
Or the default browser window already open somewhere in the background (FF for example won't bring the window to front if you open a new url)


tonyg(Posted 2006) [#3]
Works fine for WinXP SP2 with Bmax 1.20 fully synced.


Warren(Posted 2006) [#4]
Yeah, but generally if incbin can't find a file it fails the compile ... doesn't it?


degac(Posted 2006) [#5]
Yes, I have the same problem on some Windows systems. I'm still looking to find what is the problem (all the systems runs FireFox as default browser). If you have a solution, you're welcome...


Kemi(Posted 2006) [#6]
I now updated Bmax, snycmodded and rebuilt moduls, and it still doesn't work. No browser opened. IE is set as default browser.


anawiki(Posted 2006) [#7]
Does it work in windowed mode on Mac? It didn't work for us in fullscreen on Mac.


TartanTangerine (was Indiepath)(Posted 2006) [#8]
Windowed mode only. The fix is to switch to windowed and then OpenURL - in OSX.


Kemi(Posted 2006) [#9]
In fact my progr already checks this and switches to windowed mode before making the openurl.
It works on Mac OS X, but not on Win. On Win, simply nothing happens (i.e. the switch of course happens, but no browser or browser window opens)


skidracer(Posted 2006) [#10]
Degac and Kemi, does this single line program work for you?

OpenURL("http://www.zhanggames.com")


I'm running firefox as default browser with no problems.


Kemi(Posted 2006) [#11]
No, doesn't work.


skidracer(Posted 2006) [#12]
What version of Windows are you on and what browser starts up when you click on an html file on say your desktop?


Kemi(Posted 2006) [#13]
It's Windows XP.
It open's Internet Explorer when I click a .html file on the desktop.


Dreamora(Posted 2006) [#14]
hmm this reminds me of something:

Any chance you have a software firewall installed?
Because if so those should pop up a question if the operation is allowed unless you set to automatic in which case it will just block the action normally.


skidracer(Posted 2006) [#15]
Kemi, if you can build modules could your try changing brl.mod/system.mod/systemwin32.c[323] to
	return (int)ShellExecuteA(0,"open",url,0,0,SW_SHOWNORMAL)>32;	//SW_SHOWDEFAULT


also interested if you could test using a local filename such as
OpenURL "test.html" 

with a simple web page file in your appdir


Kemi(Posted 2006) [#16]
I'll try the update now and see if this helps.
If not, I'll upload a compiled version so others can test it on their Windooze-machines - maybe it's just on my computer ...


*(Posted 2006) [#17]
I would have thought
_system( "Iexplore http://www.zhanggames.com" )


that should bypass the default selected browser and run Internet Explorer directly.


Kemi(Posted 2006) [#18]
With the new update it seems to work.
I've uploaded the game now. It's here:

http://www.zhangdownload.com/thetimeportal-win.zip

Please test and comment.