Can you make alt+tab to only one key?

Ask gaming related questions
Nexor8bit
Posts: 2
Joined: 19 Sep 2017, 13:35

Can you make alt+tab to only one key?

19 Sep 2017, 13:43

Hey guys.
I will be completely honest i don't know anything about scripts and i was wondering if it's possible to make alt-tab combination to only key(i prefer only tab if it's possible).
Any answers will be appreciated.
Thanks :).
P.S if anyone wondering i need the script to multibox in game.
User 28713

Re: Can you make alt+tab to only one key?

19 Sep 2017, 22:15

Hey, I'm still new to this too but I guess this should do it.

Code: Select all

;When tab is pressed once it Alt+Tabs
Tab:: 
   Send, !{tab} 
Return   

;Alt+Esacpe to exit the script
!Escape:: exitapp 
Anyone feel free to add on it please :)
Rohwedder
Posts: 1435
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Can you make alt+tab to only one key?

20 Sep 2017, 00:08

Hallo,
try:

Code: Select all

Tab::!Tab
User avatar
jeeswg
Posts: 5282
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Can you make alt+tab to only one key?

20 Sep 2017, 04:07

Here is an attempt. You use q or tab, to either show the alt-tab menu or to tab to the next item, eventually it times out and then the window is activated.

As you normally can with the alt-tab menu, you can press Esc to quit, and Enter to immediately activate a window.

Code: Select all

*q:: ;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("q", "P")
|| GetKeyState("Tab", "P")
	vAltTabTickCount := A_TickCount
if WinActive("ahk_class TaskSwitcherWnd")
&& !(A_TickCount - vAltTabTickCount > 400)
	return
SendInput, {Alt Up}
SetTimer, AltTabSendTab, Off
return
Use this script to confirm the window title/class for the alt-tab menu:

Code: Select all

*w:: ;alt-tab menu - get details
;e.g. Windows 7: TaskSwitcherWnd|TaskSwitcherWnd
WinGetClass, vWinTitle, A
WinGetClass, vWinClass, A
MsgBox, % Clipboard := vWinTitle "|" vWinClass
return
Nexor8bit
Posts: 2
Joined: 19 Sep 2017, 13:35

Re: Can you make alt+tab to only one key?

20 Sep 2017, 13:07

Thank you everyone so much.it works as i want :) .
mc90
Posts: 2
Joined: 23 Sep 2017, 19:19

Re: Can you make alt+tab to only one key?

23 Sep 2017, 21:35

Could you guys help bind Alt+Tab to a middle click for me?
User avatar
jeeswg
Posts: 5282
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Can you make alt+tab to only one key?

24 Sep 2017, 06:38

You could take my script above and make 3 changes:
- *q:: to *MButton::
- $Tab:: to ;$Tab::
- if GetKeyState("q", "P") to if GetKeyState("MButton", "P")
wolfmagic
Posts: 7
Joined: 17 Feb 2017, 15:53

Re: Can you make alt+tab to only one key?

11 Jul 2018, 21:10

Lwin::AltTabMenu ; would be exactly what i want, except whenever i try AltTabMenu to remap to any key, the script makes the ALT key act as if it 'sticks' (when physically it doesnt) which introduces all kinds of odd behaviors in o/s and apps ex. arrow back and forth move between web pages.

Return to “Gaming”

Who is online

Users browsing this forum: Evil-e and 17 guests