Search code examples
tabsautohotkeyrainmeteralt-key

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


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

Solution

  • 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