How to minimize a window by closing it?
问题 I want to make a window only be minimized when any act of closing it is initiated (click the close button, Alt+F4 ). For AutoHotKey I think WinMinimize is needed, but I don't know how to detect a closing event. If you know a solution for PowerShell, please share too. Related: Is it possible to catch the close button and minimize the window instead? 回答1: #NoEnv #SingleInstance Force ; Add the ahk_class of the windows you want minimize by clicking on the close button in this array: Classes :=