AutoHotKey (AHK) toggle window on top / not on top

; ============================================================
; toggle window on top / not on top
; ============================================================

+^u::     ; shift control U
          WinGet, ExStyle, ExStyle, A                     ; get info about active window
          if  (ExStyle & 0x8)  ; 0x8 is WS_EX_TOPMOST.    ; if top most
               Winset, AlwaysOnTop, off, A                ; disable on top
               WinSet, AlwaysOnTop, on,  A                ; enable on top

Published by

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: