AutoHotKey: Win on Top

I wrote this to keep my Skype conversations on top of my work, but it evolved a touch and can be used for keeping any window on top.  In my field, I often get queries via Skype, email, or other apps and need to look into while the person is still typing.  I was wasting time flipping back and forth between screens – my work then the chat, then the work, then the chat.  Some applications have a “keep on top” function, but Skype does not.  Soooo I needed to improvise.

Yes this is a geeky post, but I wanted to share… If you like this, please check out my main blog for other helpful articles!

Here is the script:

#persistent
#singleinstance
;This is my fancy tooltip to give the user some options…
TextToolTip = To make your current window stay on top simply type Windows + S.`n…TrayTip, Welcome to Win Helper!, %TextToolTip%, 10, 1
;This is the shortcut definition
#s:: ; Find the ID of the active window and store it in WID
WID := WinExist("A")
; Redraw it to make it pretty – I’m 85% sure this is necessary
WinSet, Redraw, ,ahk_id %WID% ; Toggle the Always on Top function for that WID
WinSet, AlwaysOnTop, Toggle, ahk_id %WID% ; If on, this script turns it off – if off, it turns on.
Return
Win on Top (61)

It’s pretty simple – feel free to shoot any suggestions to ab@justanasterisk.com.

~ab

Get Adobe Flash playerPlugin by wpburn.com wordpress themes