Duplicate Firefox tab

Get help with using AutoHotkey and its commands and hotkeys
Haswell
Posts: 34
Joined: 21 Feb 2016, 17:11

Duplicate Firefox tab

23 May 2020, 05:50

I want to make a hotkey "Ctrl + Left mouse click" to a Firefox tab to "duplicate a tab".
To duplicate a tab in Firefox a user needs to press Ctrl and to click to a tab, and then move the tab right.
I tried to do it in this script.

This is my code that doesn't work:

Code: Select all

#IfWinActive, ahk_class MozillaWindowClass
^LButton::
	Send, {CtrlDown}
	MouseClickDrag, Left, 0, 0, 20, 0, 100, R
	Send, {CtrlUp}
return
#IfWinActive

How to make it working?
Last edited by Haswell on 25 May 2020, 05:32, edited 1 time in total.
User avatar
Yakshongas
Posts: 310
Joined: 21 Jan 2020, 08:41
Facebook: Yakshongas

Re: Duplicate

23 May 2020, 05:58

Maybe like this?
Since right clicking a tab creates a menu maybe try moving in that menu with the arrow keys and hitting Enter in the desired option.

Code: Select all

#IfWinActive, ahk_class MozillaWindowClass
    ^~RButton::
        Sleep, 100 ;Adjust this delay as you need.
        SendEvent, {Down 4}{Enter}
    Return
#IfWinActive
Want to have a talk on Discord? Yakshongas#9893 🎮
Please mark your topics as solved if you don't need any further help. ✅
Haswell
Posts: 34
Joined: 21 Feb 2016, 17:11

Re: Duplicate

Yesterday, 07:52

Thanks for your solution but I'm looking for something more reliable and straightforward (without appearing menu and not based on the number of an item in a list in menu which can be changed in the next Firefox version) and with LButton because RButton conflicts with another my hotkey (Double right click to close a window).
Focusing our efforts on non-productive and non-creative endeavours wastes lives as surely as war.
Jacque Fresco / The best that money can't buy

Return to “Ask For Help”

Who is online

Users browsing this forum: along, brotherS, dtsmarin2, Gavnar, nmnogueira and 96 guests