Run script and use
hotkeys Win+n (next) and
Win+b (before) to cycle through open explorer windows.
Code: Select all
#NoEnv
#Warn
#SingleInstance, Force
#n:: WinActivate, % "ahk_id" NotStr( WinExist("A"), Explorer_hList(0) ) ; Next
#b:: WinActivate, % "ahk_id" NotStr( WinExist("A"), Explorer_hList(1) ) ; Before
Return
Explorer_hList(Rev:=0) {
Local Window, hWnd, hList := ""
For Window in ComObjCreate("Shell.Application").Windows
If ( Window.Name="Windows Explorer" or Window.Name="File Explorer" )
&& ( hWnd := WinExist( "ahk_id" . Window.hWnd) )
Rev ? hList .= hWnd . "|" : hList := hWnd . "|" . hList
Return RTrim(hList,"|")
}
NotStr(S:="", Z:="", D:="|") { ; NotStr v0.6b By SKAN on D34M/D34R @ tiny.cc/notstr
Local Q, LS:=StrLen(S), LZ:=StrLen(Z), LD:=StrLen(D), P1, P2, Q
Return SubStr(LZ?Z:1,(P1:=LS+LZ=0||S=Z?1:InStr(Z,(S)(D),0,0-LZ+LS+LD)?LS+LD+1:InStr(Z,(D)(S),0,LZ
-LS)?1:(Q:=InStr(Z,(D)(S)(D)))?Q+LD+LS+LD:1),(LS+LZ=0?2:S=Z?1:(Q:=InStr(Z,D,0,P1))?Q:LZ+1)-P1)
}