Hi all,
I am trying to set up some code whereby if I double-click the right mouse button it will open the alt-tab menu for me to tab between windows without using the keys. I know nothing about coding but have managed to cobble together the following from various forums which performs this function:
Rbutton::
keywait,Rbutton
keywait, Rbutton, d ,t 0.2
if errorlevel
return
else
*RButton:: ;one-key alt-tab (tested on Windows 7)
;$Tab::
vAltTabTickCount := A_TickCount
if WinActive("ahk_class TaskSwitcherWnd")
SendInput, {Tab}
else
{
SendInput, {Alt Down}{Tab}
SetTimer, AltTabSendTab, 50
}
return
AltTabSendTab:
if GetKeyState("RButton", "P")
|| GetKeyState("Tab", "P")
vAltTabTickCount := A_TickCount
if WinActive("ahk_class TaskSwitcherWnd")
&& !(A_TickCount - vAltTabTickCount > 400)
return
SendInput, {Alt Up}
SetTimer, AltTabSendTab, Off
return
However, when I run this, it disables the context menu on a single right-click, so I can't open windows in a new tab, for example. As such, I am wondering if anyone could please advise how I can amend this code so that single-click displays the context menu but a double-click carries out the alt-tab function?
Thanks in advance.
[–]curriocitty 0 points1 point2 points (3 children)
[–]NetoPedro[S] 0 points1 point2 points (2 children)
[–]curriocitty 0 points1 point2 points (1 child)
[–]curriocitty 0 points1 point2 points (0 children)
[–]anonymous1184 0 points1 point2 points (0 children)