Jump to content

Open a Link in default browser


Recommended Posts

Couple of options from the wiki for the default browser if needed

_GetDefBrowser() ~ Author JScript
; Check to see which browser is the default.

MsgBox(4096, "Default browser", "My default browser is: " & _GetDefBrowser())

Func _GetDefBrowser()
    Local $sRegRead = RegRead("HKCRhttpshellopencommand", "")
    Return StringRegExpReplace($sRegRead, "(.*?x22)(.*?[/])*(.*?)(x22.*?z)", "$3") ; << Credits to SmOke_N
EndFunc   ;==>_GetDefBrowser
[/font][/left]

Or

_GetDefaultBrowser() ~ Author - guinness
; Get the default browser of the system.

#include <APIConstants.au3> ; Download from http://www.autoitscript.com/forum/topic/98712-winapiex-udf/ by Yashied.
#include <WinAPIEx.au3> ; Download from http://www.autoitscript.com/forum/topic/98712-winapiex-udf/ by Yashied.

ConsoleWrite(_GetDefaultBrowser() & @CRLF)

Func _GetDefaultBrowser()
  Return _WinAPI_AssocQueryString(".html", $ASSOCSTR_EXECUTABLE)
EndFunc   ;==>_GetDefaultBrowser

See the link in my Sig for more examples

Edited by Chimaera
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...