Sign in to follow this  
Followers 0
PaulDG

Open New Default Browser

5 posts in this topic

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.

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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.

Share this post


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
Sign in to follow this  
Followers 0