AutoItSetOption ("WinTitleMatchMode", 2) Global $i = 1 Global $j = 0 Global $k = 1 Global $win1, $win2 #cs WinSwitchie HANDLE, v0.1 Samuel Murray, February 2020 Identify two windows, and then the shortcut key (by default `) will activate them in turn. In the HANDLE version, the user selects the windows by pressing Shift+Ctrl+` when the window is active, and then it uses the window's handle to identify it. In the TITLE version, the user types the window titles in manually. #ce $hellow = MsgBox (260, "WinSwitchie HANDLE v0.1", "Have you read the readme.txt file?", 0) If $hellow = 7 Then Exit HotKeySet ("`", "switchie") HotKeySet ("!`", "helpie") HotKeySet ("+^`", "selectie") HotKeySet ("^`", "exittie") While 1 Sleep ("100") WEnd Func selectie() $j = 1 If $k = 1 Then $k = 2 Else $k = 1 EndIf If $k = 2 Then $win1 = WinGetHandle ("[ACTIVE]") $win1title = WinGetTitle ($win1) MsgBox (0, "Success!", $win1 & @CRLF & $win1title, 0) Else $win2 = WinGetHandle ("[ACTIVE]") $win2title = WinGetTitle ($win2) MsgBox (0, "Success!", $win2 & @CRLF & $win2title, 0) EndIf EndFunc Func exittie() Exit EndFunc Func helpie() MsgBox (0, "", "[" & $win1 & "]" & @CRLF & "[" & $win2 & "]", 0) EndFunc Func switchie() If $j = 0 Then MsgBox (0, "", "No windows selected yet. Go to a window and press Shift+Ctrl+` to select it.", 0) Return EndIf If $i = 1 Then $i = 2 Else $i = 1 EndIf If $i = 2 Then WinActivate ($win1) Else WinActivate ($win2) EndIf EndFunc