OpenURL-command to Blitz3D

Blitz3D Forums/Blitz3D Userlibs/OpenURL-command to Blitz3D

Marcell(Posted 2014) [#1]
Hello Blitz community! I have published my OpenURL-userlib in my mbnet homepage, URL is http://koti.mbnet.fi/mrm/

My userlib adds OpenURL-command to Blitz3D that opens given URL in the default browser -- see more details in the webpage.

My subscription to MB-magazine ends 1.4.2014 and after that the mentioned page is gone, but I will publish the project somewhere else after that and probably with some other free stuff I've made.

Do try it (it's freeware software) and tell me, if you have problems using it.

I haven't checked if someone else has made earlier something like this, but at least this is free.


GfK(Posted 2014) [#2]
Hmm... it's exactly what the native ExecFile() does?


Marcell(Posted 2014) [#3]
No, this one uses ShellExecute to open the webpages.

Edit: I just checked that Blitz3D has ExecFile(). I haven't tried that ever, my userlib uses in C++ ShellExecute, but I'm not sure if you can get the same result with Blitz3D's ExecFile(). At least the userlib gives "native" command OpenURL() to open webpage in the default browser.


xlsior(Posted 2014) [#4]
ExecFile() will also open a http:// URL in the default browser. :-?


Marcell(Posted 2014) [#5]
This is new to me. Like I said I haven't ever tried ExecFile(). Quick look in the manual gives me impression that specific exe should be open, can anyone give example how the default browser could be launched?

Edit: I now remember reading about Blitz3D's ExecFile() in the distant past, but I had no idea that the default browser could be launced with it. This is why I've made userlib in C++ that opens URL in the default browser. It's almost midnight here, time to go to sleep.

Edit: I'm still wondering that is my userlib useless; can an URL be opened with Blitz3D's ExecFile() with the default browser?


xlsior(Posted 2014) [#6]
Edit: I'm still wondering that is my userlib useless; can an URL be opened with Blitz3D's ExecFile() with the default browser?


Yup:

Execfile("http://www.google.com") will open it in the default browser, nothing more required.


Marcell(Posted 2014) [#7]
Thanks for the example! I should have looked more carefully the manual before making the userlib. Though I learned some new things in C++. :-)


_PJ_(Posted 2014) [#8]
It is essentially the same, since the ExecFile will attempt to open the file according to the registration of the filetype.
In fact, I am willing to bet that ExecFile basically makes a call to the ShellExecute functionality anyway...