|
Post by David Drake on Dec 23, 2019 22:00:03 GMT -5
Quite simply, I'd like to launch the computer's default web browser and open a specific http address.
For example,
run "http://www.google.com"
or something like that. Any ideas?
Thanks. David
|
|
|
Post by Chris Iverson on Dec 23, 2019 22:37:43 GMT -5
Usually, you can do that by piggybacking on Windows Explorer.
run "explorer.exe https://www.google.com"
Should open your default browser, pointing to google.
|
|
|
Post by metro on Dec 23, 2019 23:02:07 GMT -5
EDIT: posted before testing Chris's code,my default browser (firefox) does open at google.com using his code
If , like me you use another browser this may help URLFile$="https://www.asx.com.au/asx/markets/equityPrices.do?by=asxCodes&asxCodes=qbe" lpOperation$ = "open" lpParameters$ = "" lpDirectory$ = DefaultDir$ nShowCmd = _SW_SHOWNORMAL calldll #shell32, "ShellExecuteA", _ hWindow as ulong, _ 'parent window lpOperation$ as ptr, _ 'open or print URLFile$ as ptr, _ 'file name lpParameters$ as ptr, _ 'null lpDirectory$ as ptr, _ 'default directory nShowCmd as long, _ 'show window flag result as long if result <= 32 then print "Error, Address Failure!" print "Done" end if
Give some thought to buying Alyce's book www.lulu.com/shop/alyce-watson/apis-for-liberty-basic/ebook/product-18586977.htmlus seniors could do with financial assistance in our twilight years
|
|
|
Post by Chris Iverson on Dec 23, 2019 23:16:12 GMT -5
ShellExecute() is indeed another way to go, and the way I recommend if cheating with explorer.exe doesn't work.
|
|
|
Post by David Drake on Dec 23, 2019 23:21:42 GMT -5
Usually, you can do that by piggybacking on Windows Explorer. run "explorer.exe https://www.google.com" Should open your default browser, pointing to google. Thanks! I knew there had to be a simple solution.
|
|