Possible to show a list of all currently open windows?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Coldblackice
Posts: 29
Joined: 13 Nov 2013, 14:39

Possible to show a list of all currently open windows?

Post by Coldblackice » 11 Oct 2021, 06:35

Is there a way to show all currently open windows, program windows + most of all, Windows explorer/folder windows?

I recall someone making a sort of AHK control panel years back with various multi-functions, one of which being a sortable list of all currently open Windows folder windows + program windows open at that moment. I would peek at how this did it, but I can't find it for the life of me. TIA

User avatar
mikeyww
Posts: 26848
Joined: 09 Sep 2014, 18:38

Re: Possible to show a list of all currently open windows?

Post by mikeyww » 11 Oct 2021, 07:06

:arrow: WinGetExample

Code: Select all

F3::
titles =
WinGet, explorer, List, ahk_class CabinetWClass ahk_exe explorer.exe
Loop, %explorer% {
 WinGetTitle, wTitle, % "ahk_id " explorer%A_Index%
 titles .= "`n" wTitle
}
MsgBox, 64, Explorer titles, % titles := SubStr(titles, 2)
Return

User avatar
Coldblackice
Posts: 29
Joined: 13 Nov 2013, 14:39

Re: Possible to show a list of all currently open windows?

Post by Coldblackice » 20 Oct 2021, 16:04

mikeyww wrote:
11 Oct 2021, 07:06
:arrow: WinGetExample

Code: Select all

F3::
titles =
WinGet, explorer, List, ahk_class CabinetWClass ahk_exe explorer.exe
Loop, %explorer% {
 WinGetTitle, wTitle, % "ahk_id " explorer%A_Index%
 titles .= "`n" wTitle
}
MsgBox, 64, Explorer titles, % titles := SubStr(titles, 2)
Return
Wow, didn't think this could be done so succinctly. I didn't know about "CabinetWClass", researching it now. Thanks!

Post Reply

Return to “Ask for Help (v1)”