Link to Web page
BlitzMax Forums/BlitzMax Programming/Link to Web page
| ||
EDIT : I have written a function > See bottom of Thread. |
| ||
Guess I'll have to write a function then :P |
| ||
http://www.blitzbasic.com/Community/posts.php?topic=47845 This works on Windows |
| ||
Actually it doesn't. At least not reliably on all machines. I just tried it and it doesn't do a thing. The beauty of the original ExecFile was that you could just give it the URL and it would open it in the default browser. This is another one of those very basic features which BlitzMax lacks. At the moment, so much has to be coded with workarounds, module tweaks and CPP/PB dll's that it's hardly worth using BMax at all. |
| ||
The alternative would be doing a OS check and just blocking pre-2k users (the ones with the insecure crap OS ;)) ... this would minimize the failure rate of most stuff by a quite large part ... *there is some reason why driver manufacturers aren't supporting them anymore in some cases* |
| ||
It works for me. Sybixsus, are you using the http:// tag in the url? |
| ||
This is another one of those very basic features which BlitzMax lacks. At the moment, so much has to be coded with workarounds, module tweaks and CPP/PB dll's that it's hardly worth using BMax at all. I have to agree. I'll post a workaround tomorrow... PB code again! |
| ||
The code will be based off of :-iepath.s=Space(255) iepathsize.l=255 nspath.s=Space(255) nspathsize.l=255 url.s="http:\\www.morphlings.com" RegQueryValue_(#HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE",@iepath,@iepathsize) RegQueryValue_(#HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Netscape.exe",@nspath,@nspathsize) If iepath<>"" WinExec_(iepath + " " + url,#SW_SHOWNORMAL) Else If nspath<>"" WinExec_(nspath + " " + url,#SW_SHOWNORMAL) Else ShellExecute_(0,"open",url,"","",#SW_SHOWNORMAL) EndIf EndIf |
| ||
There should be a OpenURL(url) function in Bmax that will use the machines default browser. opening a web page from an app is very basic stuff |
| ||
It works for me. Sybixsus, are you using the http:// tag in the url? Yep. There should be a OpenURL(url) function in Bmax that will use the machines default browser. opening a web page from an app is very basic stuff I agree. |
| ||
Here is a DLL that works 100% of the time and opens the URL in the default browser. http://www.indiepath.com/downloads/OpenURL.zip Simple to use in BMax Global iPtr = LoadLibraryA("OpenURL.dll") Global OpenURL(url:Byte Ptr)"win32"=GetProcAddress(iPtr,"OpenURL") ' ******************************8 OpenURL("www.indiepath.com") Have Fun. |
| ||
Nice one, Tim. Thanks for sharing. |