Last active
February 24, 2017 18:22
-
-
Save GollyJer/b9a6bf52b0f47141c1cc12f75fc876e4 to your computer and use it in GitHub Desktop.
Use Autohotkey to close a Windows Explorer folder by name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CloseExplorerFolder(win_title) { | |
WinGet, vwinID, List, ahk_class CabinetWClass | |
;MsgBox,0x1000,,there are %vWinID% windows of CabinetWClass open. | |
Loop, %vWinID% { | |
x := vWinID%A_Index% | |
WinGetTitle, wt, ahk_id %x% | |
if (wt == win_title) { | |
Winclose, ahk_class CabinetWClass | |
} | |
;msgBox,0x1000,, index=%a_Index% of %vWinID%`nwt=%wt% | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment