AHK Button to run 'alt+tab' and ends when a window is picked

1.3k Views Asked by At

I'm trying to code a button (rainmeter) that runs an AHK script for alt+tab to prompt the Task Window and ends when I pick one. So far I've come up with this:

#NoTrayIcon
#InstallKeybdHook 
#InstallMouseHook 
Send, !{Tab}
KeyIsDown :=
GetKeyState (LButton,P)
return
ifEqual, KeyIsDown, 1
Exit
1

There are 1 best solutions below

0
Relax On BEST ANSWER

Windows 7/10:

Ctrl+Alt+Tab prompts the Task Window.

Send {Ctrl down}{Alt down}{Tab}{Alt up}{Ctrl up}

Windows 8:

Run %A_AppData%\Microsoft\Internet Explorer\Quick Launch\Window Switcher.lnk