October 28, 2018

Window always on top

Problem description

Sometimes it is pretty useful to set a Window to be always on top e.g. when viewing a video on the side or presenting something with your video camera stream on the top.

 With AutoHotkey it doesn't take more than one line of code:
; Toggle Always on Top CTRL+Shift+SPACE on current window
^+SPACE::  WinSet, AlwaysOnTop, Toggle, A


If you want to add this to a SystemTray icon menu, mind the trick with SendInput, !{Esc} to reset the focus to the previous active Window after clicking on the menu.

Menu,Tray,Add, Toggle AlwaysOnTop (Ctrl+Shift+ Space), SysTrayToggleAlwaysOnTop

SysTrayToggleAlwaysOnTop:
SendInput, !{Esc}
WinSet, AlwaysOnTop, Toggle, A
return

This feature is implemented in the NWS PowerTool


References

No comments:

Post a Comment