I have this autohotkey file. When I press F2, it toggles through any windows explorer tabs I have open and keeps it in focus / sends it to the top. If no file explorer windows are open, it opens one up

enter image description here

Code

F2::
IfWinNotExist, ahk_class CabinetWClass
    Run, explorer.exe
GroupAdd, kjexplorers, ahk_class CabinetWClass ;You have to make a new group for each application, don't use the same one for all of them!
if WinActive("ahk_exe explorer.exe")
    GroupActivate, kjexplorers, r
else
    WinActivate ahk_class CabinetWClass ;you have to use WinActivatebottom if you didn't create a window group.
Return

The problem I have is I can't make it work for other applications. Many times I have multiple chrome windows open, or multiple excel files open, and I can't cycle through them like I can here with a different hotkey. I tried replacing the .exe file names, groupnames, doesn't work with anything but windows explorer here

F5::
IfWinNotExist, ahk_class Chrome_WidgetWin_1
    Run, chrome.exe
GroupAdd, kjexplorers5, ahk_class Chrome_WidgetWin_1 ;You have to make a new group for each application, don't use the same one for all of them!
if WinActive("ahk_exe chrome.exe")
    GroupActivate, kjexplorers5, r
else
    WinActivate ahk_class Chrome_WidgetWin_1 ;you have to use WinActivatebottom if you didn't create a window group.
Return

This is the basic variant autohotkey I'm using to cycle through chrome windows and put them up top.

full answer here: Windows shortcut key to maximize all chrome windows or any specific application

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.