Set this to false to let these errors through. #ErrorStdOutĬatchWindowsExplorerErrors := true Windows Explorer creates a number of invisible windows which breaks behavior when using the alt menu. I found that Windows Explorer creates extra processes and windows when pressing alt so I've added CatchWindowsExplorerErrors = true to filter out these. I really like the way Mac handles this functionality so I tried to mimic that behaviour as closely as possible.Īlt + ` to cycle forwards through windowsĪlt + shift + ` to cycle backwards through windows I couldn't get any of these answers to do quite what I wanted so I took inspiration from jenda's solution and wrote my own AHK V2 script.
So, in case you also like this better, change !':: to !|. In addition: I like having this functionality tied to the key Alt + |. Activate the next window and send it to the top. Each time you press Command+ you will switch to the next window available in the active application. is also the tilde key, and you can find it on US keyboards under ESC or above Tab. Since activating a window puts it at the top of the list, we have to take from the bottom. The keyboard shortcut to remember for switching between windows of the same application is Command+. Win_list := WinGetList("ahk_exe" active_process_name) Win_list := WinGetList("ahk_exe" active_process_name " ahk_class" win_class) If (active_process_name = "explorer.exe") We have to be extra careful about explorer.exe since that process is responsible for more than file explorer Helpful Hint: Hold the Alt button to see a list of all your windows. The last window you visited will pop up if you do this quickly. While still holding the Alt button, tap the Tab button. I'm not sure if it has all the intended features, but it works fine and will be what I'll be using #Requires AutoHotkey v2.0Īctive_process_name := WinGetProcessName("A") The Tab button on a keyboard will help you switch between windows. I tried to implement EugeneK's script as well in v2.
If (OldClass != "CabinetWClass" or NewClass = "CabinetWClass")įrom this it should also be easy to convert the script of EugeneK. WinClassCount := WinGetCount("ahk_exe" ActiveProcessName) I've updated the script of harrymc to be executable in AutoHotkey v2: #Requires AutoHotkey v2.0ĪctiveProcessName := WinGetProcessName("A")