Jump to content

Open New Default Browser


PaulDG
 Share

Recommended Posts

Hi All,

I would like to open a new default browser with either the Dll method

DllCall("Shell32.dll", "int", "ShellExecute", "hwnd", 0, "str", 'open', "str", $URL, "str", '', "str", @WorkingDir, "int", 1)

or the Obj Method

$o_URL = ObjCreate("Shell.Application")
$o_URL.Open($URL)

Both these methods work but reuse an existing window.

I have searched for the last hour and not found an answer.

Thanks for any help.

Link to comment
Share on other sites

@PaulGX

This is the function to read the default browser settings from your system

Func GetBrowser() ;Get Registry Default Browser settings
    $Browser = StringSplit(RegRead("HKLM\SOFTWARE\Classes\HTTP\shell\open\command",""),"%")
    $HTTP = $Browser[1] & " " & "www.AutoITscript.com"
EndFunc

I have used this in my application, see here for more info

http://www.autoitscript.com/forum/index.php?showtopic=12682

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...