TIP. This is a great and useful AutoHotKey script to close all Windows (in general): Studio, Word, Browsers, Outlook, etc. —Not mine, though

Former Member
Former Member

At the end of a long day, having worked on translation projects, juggled e-mails, opened documents, browsers, folder explorers, control panel, players, etc. I may have up to 20 or more Windows open (luckily, Windows 10 is very good at multitasking) and closing them is kind of boring and time consuming. Well, thanks to an AutoHotKey script that I found on the web now I can have those windows closed for me. I only have to take care of unsaved files (the operating system will prompt me to save or discard).

I haven't had a chance to dig into AutoHotKey, though I installed it already, but if you know the basics of AutoHotKey (http://fincs.ahk4.net/scite4ahk/) you can just copy scripts from the web, including from here, the SDL translation productivity dedicated to this tool (https://community.sdl.com/product-groups/translationproductivity/f/400). The script, once you run it, will start working by pressing Ctrl+WinKey+1 (that's the only thing I "programmed").

What counts in the first line of the script is what's left to ::, in this case ^#1 and that's called the Hotkey . This means ^ Ctrl key, # Windows key (WinKey) and 1, the number 1 key. Press all of them at the same time.

Here's the source code, including the website where I got it. I named this script TimeToLeave.ahk. In a DOS console type the name of the script, then hit Enter. Next, press Ctrl+WinKey+1 and see how all of your open Windows will close for you. Great time saver! Hope it helps.

 

^#1::
; From: https://github.com/matthewmorrone/autohotkey/blob/master/dev/close-all-windows.ahk
WinGet, id, list, , , Program Manager
Loop, %id%
{
 StringTrimRight, this_id, id%a_index%, 0
 WinGetTitle, this_title, ahk_id %this_id%
 winclose,%this_title%
}
Return

Parents Reply Children