topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 8, 2024, 12:40 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Change default browser script  (Read 9064 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Change default browser script
« on: February 01, 2014, 10:19 AM »
I need the code to change the default browser.
By example

IE-FF-chrome-Safari, etc.

I supposed that run a web with a browser different to the default is :
If the default browser is : IE
and I want to launch a web with FF

Run C:\Program Files (x86)\Mozilla Firefox\firefox.exe https://www.google.com
or perhaps
run "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" http://www.google.com

but my target is run websites from a txt file where the path to the browser isn't and don't know the browser finally is on.

 :-*

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Change default browser script
« Reply #1 on: February 01, 2014, 10:33 AM »
That could be handy... We already have Open Link in New Tab and Open Link in New Window, how about Open Link in New Browser?
vi vi vi - editor of the beast

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Change default browser script
« Reply #2 on: February 01, 2014, 11:05 AM »
but my target is run websites from a txt file where the path to the browser isn't and don't know the browser finally is on.

You can do what you want with a simple batch (.bat) file.

"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" http://www.google.com
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" http://www.bing.com
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" http://www.cnn.com
...

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Change default browser script
« Reply #3 on: February 01, 2014, 11:06 AM »
I have one script to open in differents tabs for IE .

Exist the equivalent for FF ?

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Recommended for catching common errors.pongo ; inicial por error al compilar sobre esta línea.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
URL = http://www.google.com/search?q=
navOpenInNewWindow = 1
navOpenInNewTab = 2048
navOpenInBackgroundTab = 4096
navOpenNewForegroundTab = 65536

FileSelectFile, filepath
wb := ComObjCreate("InternetExplorer.Application") ; create IE
wb.Visible := true ; 'false' to not show IE
loop, Read, %filepath%
{
if (A_index = 1)
   wb.Navigate2(URL . A_LoopReadLine, navOpenNewForegroundTab) ; Navigate
else
wb.Navigate2(URL . A_LoopReadLine, navOpenInBackgroundTab) ; Navigate
sleep 100
}
return

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Change default browser script
« Reply #4 on: February 01, 2014, 11:07 AM »
but my target is run websites from a txt file where the path to the browser isn't and don't know the browser finally is on.

You can do what you want with a simple batch (.bat) file.

"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" http://www.google.com
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" http://www.bing.com
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" http://www.cnn.com
...


I would like to learn to change the default browser with a script .........

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Change default browser script
« Reply #5 on: February 01, 2014, 11:08 AM »
I would like for this occasion only AHK scripting codes
 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Change default browser script
« Reply #6 on: February 01, 2014, 11:16 AM »
I am searching.

"The methods for changing the default browser vary across browsers, operating systems, and device types."

But perhaps these methods are base interacting with the browsers and not with the windows registry.....

How can i do that ?

 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Change default browser script
« Reply #7 on: February 01, 2014, 11:24 AM »
Looking working this :

Change Default Browser 1.0


Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Change default browser script
« Reply #8 on: February 01, 2014, 11:36 AM »
I have installed from
http://www.changedefaultbrowser.com/

Recognises the browsers i have installed. But not the portables ones.
And only four browsers predefined obvously

 :-* :-\

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Change default browser script
« Reply #9 on: February 01, 2014, 11:37 AM »
Nevertheless with this script we can't automate the change. Only make faster the change.
 :P

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Change default browser script
« Reply #10 on: February 01, 2014, 11:40 AM »
There is also mouser's own BrowserTraySwitch:

https://www.donation...owsertray/index.html

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Change default browser script
« Reply #11 on: February 01, 2014, 03:25 PM »
You can get some files pointed to a portable browser by using a dummy html file.  I have one in BrowserBunch just to call FindExecutable() to see which browser opens .html web pages. (Right click, open with, then select the exe file using file open dialog.)

I think PortableApps may have a "hack" for making a portable browser the default.  But it's not smooth. Once it is in the Registry then it's not totally "portable" anymore.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Change default browser script
« Reply #12 on: February 01, 2014, 03:46 PM »
There is also mouser's own BrowserTraySwitch:

https://www.donation...owsertray/index.html

Mouser !!!!!!!!!!!!!. Running to try
 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Change default browser script
« Reply #13 on: February 01, 2014, 05:17 PM »
Súper !!!!!!. Dinamically configurable.
Obviously we can't configurate portable Torch as the default browser.....
But for a "rara avis" the portable coolnovo seems well configured. ....

Perhaps is only a Chrome...
I have opera as portable and not portable installation.
A great program !!!!!!

the configurations files are really editable with notepad
FIREFOX.btsregfile

and contains a lot of codes from the windows registry or to me seem so.
And have a manual configuration mode from the command line.....

 :P