Jump to content

Non-browser-specific web links

Recommended Posts

I'd like to create a button/link that opens a web page in the user's default browser.

I know I could just use the run command and iexplore.exe - but what if internet explorer isn't installed on that machine?

Is there any way of calling the default browser for that machine?

edit: sorry - just realised there is a similar topic a few questions down - i would delete this post and put the question there, but i don't think thats possible :)

Edited by sjorrel
Link to post
Share on other sites
Link to post
Share on other sites

A complete example:

#include <file.au3>
$URL    = "http://www.autoitscript.com/forum"
$fd     = FileOpen(@TEMPDir & "url.url",2)
if $fd = -1 Then Exit
FileWriteLine($fd,"URL=" & $URL)
Run(@comspec & " /c " & chr(34) & @TEMPDir & "url.url" & chr(34))
Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
Link to post
Share on other sites
  • 2 weeks later...

Well this solution is only if you want to use your own browser but here is an example on open your wanted site with CWebPage library...

$dll = DLLOpen("cwebpage.dll")

$hwnd = GUICreate("MediePlayer...",800,600,-1,-1)




While 1

$msg = GUIGetMsg()

If $msg = -3 Then ExitLoop


$ret = DLLCall($dll,"long","UnEmbedBrowserObject","hwnd",$hwnd)


Func OnAutoItExit()



This is a very nice library from Jeff Glatt, an old computer guru from the R.I.P. Amiga days...

Kåre :)

Edited by kjactive
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...