Jump to content

Recommended Posts

Posted

My friends i would like to know how to make a link to open in the default browser..

i.e. i have a gui with a button named autoit.com what to use to open that link.

thank you

[font="verdana, geneva, sans-serif"] [/font]

Posted (edited)

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

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
×
×
  • Create New...