Can you make alt+tab to only one key?

Ask gaming related questions (AHK v1.1 and older)
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: 7622
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: 6902
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
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
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: 6902
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")
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
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.
arehm
Posts: 1
Joined: 07 Nov 2022, 15:17

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

07 Nov 2022, 15:19

This is way late to the game, but here's my single key Alt-Tab Binding I've been using for Ages. It's bound to the ` key. Top left right below the ESC key. Works like a champ.

Code: Select all

`::
Send {Alt down}{tab}
Send {Alt up}
return
proxxxxx
Posts: 1
Joined: 29 Nov 2023, 04:36

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

29 Nov 2023, 04:41

arehm wrote:
07 Nov 2022, 15:19
This is way late to the game, but here's my single key Alt-Tab Binding I've been using for Ages. It's bound to the ` key. Top left right below the ESC key. Works like a champ.

Code: Select all

`::
Send {Alt down}{tab}
Send {Alt up}
return
Created account just to thank you.
Thank You!! This works exactly as needed

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 35 guests