the script closes all lister windows with the specified file extensions in the title.
why?
this may be a little specific, but it is useful if you use lister to preview/quick listen audio files and would otherwise have multiple active lister windows playing sound (or you'd have to close the active one each time).
how?
- requires ahk v2
- default hotkey is shift+F3. but can easily be changed to another hotkey involving F3
Code: Select all
~+F3:: {
audioExtensions := [".mp3", ".wav", ".ogg", ".m4a"]
hwndList := WinGetList("ahk_class TLister")
for hwnd in hwndList {
title := WinGetTitle(hwnd)
for ext in audioExtensions {
if InStr(title, ext) {
OutputDebug "[AHK][TOTALCMD] Closing Lister window: [" title "], HWND: [" hwnd "]."
WinClose(hwnd)
break
}
}
}
}