Closed yingxiaoGuo closed 4 years ago
It's achievable, but I probably won't add it. It feels a bit unnecessary to add this as a feature.
Here is the code:
Loop
{
WinGet, PinList, List, ahk_class Notepad ; change here (use Window Spy for help)
Loop, %PinList%
{
WinGet, ExStyle, ExStyle, % "ahk_id " PinList%A_Index% ; get ExStyle
if !(ExStyle & 0x8) ; if not AlwaysOnTop (0x8 is WS_EX_TOPMOST)
{
Winset, Alwaysontop, On, % "ahk_id " PinList%A_Index%
}
}
}
To run it, you will need to have AutoHotkey installed. Then save the code as AutoPin.ahk
.
is it possible to add autopin rule for specific window? Like every time it opens, it will be pined