Jump to content
Sign in to follow this  
Auto42

Open a Link in the same tab (Firefox)

Recommended Posts

Auto42

Hi,

I' am new to AutoIt and wrote a Script opening an Url by use of the

ShellExecute("firefox.exe", <Url>)

command. Using this command I noticed that every time a new tab is opened.

I saw that it is possible to assign some other optional parameters to the ShellExecute command. Does there exist any parameter to "say" my browser that I want the url opened in the same tab?

Or is this exclusively possible with  FF.au3 command _FFstart(...$iMode=2)? If not necessary I don't like to install the MozRepl addon, which is imperatively needed to make FF.au3 functions work.

I would be pleased for any advice.

Regards

Auto42

 

Share this post


Link to post
Share on other sites
Neutro

Hello,

Try this in firefox:

about:config

browser.link.open_newwindow = 1

(1 = force new window into same tab)

 

browser.link.open_newwindow.restriction = 0

(0 = apply the setting to ALL new windows (even script windows))

 

then when you use ShellExecute("firefox.exe", <Url>), it should open your link in the same tab.

Edited by Neutro

Share this post


Link to post
Share on other sites
Auto42

Hi,

that would be a possible solution. Nevertheless it changes the behaviour of my FF browser at all. When browsing I would prefer my standard settings. But guess that means there is no other solution (...besides FF.au3) to change / influence the browser behavior...?.

Auto42

Share this post


Link to post
Share on other sites
iamtheky

what is your ultimate intent, would killing the current tab and opening a new one serve the same purpose (Sending Ctrl+W and using the command line to open a new tab), or do you need to be able to navigate the previous pages?


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

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  

×