Jump to content

Recommended Posts

Posted

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.

Posted

Thanks

Unfortunatly that wont work as its IE specific and i need to load the default browser as i dont know which browser is installed on the target pc.

Posted

@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

Posted

Thanks ptrex, That is working perfectly.

Although I would still like to hear from anyone who knows how to do this via the 2 methods I listed above.

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...