SEARCH

How-To Geek

Keep a Window on top with a handy AutoHotkey script

Are you tired of shuffling back and forth between windows to get your work done?  Here’s a handy tool that lets you keep any window always on top when you need it.

There are many ways to use multiple windows efficiently, but sometimes it seems you need to keep a smaller one in front of a larger window and they never quite fit right.  Whether you’re trying to use Calculator and a web form at the same time, or see what music is playing while you’re catching up on your news, there’s many scenarios where it can be useful to keep one window always on top.  There are many utilities to do this, but they are often needlessly complicated and bloated.  Here we look at a better solution from Amit, our friend at Digital Inspiration.

Always on Top

Thanks to AutoHotkey, you can easily always keep any window on top of all the others on your screen.  You can download this as a small exe and run it directly, or can create it with a simple script in AutoHotkey.  For simplicity, we simply downloaded the application and ran it directly.

To do this, download Always on Top (link below), and unzip the file.

image

Once you’ve launched it, simply select the window you want to keep on top and press Ctrl+Space.  This program will now stay in front, even when it is not the active window.  Here’s a screenshot of a Hotmail signup dialog in Chrome with Notepad kept on top.  Notice Notepad isn’t the active application, but it is still on top.

image

If you wish to un-pin the window from being on top, simply select the window and press Ctrl+space again.  You can keep multiple windows pinned at once, too, though you may clutter your desktop quickly!

Always on Top will keep running in your system tray, and you can exit or suspend it by right-clicking on its tray icon and selecting exit or suspend, respectively.

image

Create Your Own Always on Top Utility with AutoHotkey

If you’re a fan of AutoHotkey, you can create your own AutoHotkey script to keep windows on top simply and easily with only one line of code:

^SPACE::  Winset, Alwaysontop, , A

Simply create a new file, insert the code, and save it as plaintext with the .ahk file extension.  If you have AutoHotkey installed, simply double-click this file for the exact same functionality as the premade version.

Conclusion

This is a great way to keep a window handy, and it can be beneficial in many scenarios.  For instance you can use it to copy data from a PDF or image into a form or spreadsheet, and it saves a lot of clicks and time. 

Links:

Download Always on Top from Digital Inspiration

Download AutoHotkey if you want to make it yourself

Matthew digs up tasty bytes about Windows, Virtualization, and the cloud, and serves them up for all to enjoy!

  • Published 03/29/10

Comments (12)

  1. jon_hill987

    Why they didn’t add this feature in Windows 7 is beyond me. Aero snap is just a flashy new way of using the old tile feature and too easy to do by mistake (so I turned it off).

  2. MiezeKater33

    A windows on top on/off toggle is even more useful. :)

    Autohotkey Script:

    ^SPACE::
    WinGet, ExStyle, ExStyle, A
    if (ExStyle & 0×8)
    {
    WinSet,AlwaysOnTop,off,A
    ToolTip,Disabled
    }
    else
    {
    WinSet,AlwaysOnTop,on,A
    ToolTip,Enabled
    }
    Sleep,2000
    ToolTip
    return

  3. Matthew Guay

    @MiezeKater33 – Wow, thanks! I’ll have to try this out!

    @jon_hill987 – Actually, Aero Snap is one of my favorite new features in Windows 7. But glad you could turn it off since you didn’t like it … that’s what “personal” computers are for :)

  4. BookwormDragon

    Works beautifully. Exactly what I was looking for, thanks!

  5. pahmduan

    With windows 7 ,i have an easy choose : just right click after moving cusor exit button.
    Video:
    http://www.youtube.com/watch?v=Jc3G6GURceE

  6. Ross Goodman

    Hi

    I tried both the code in the main article and the code in MiezeKater33′s comment but neither of these worked. I changed the hotkey to ctrl+shift (^+) and embedded it in with the WindowPad code that I use.
    Pressed the key, nothing happened, no windows stayed on top!

    Windows XP Prof if that makes any difference.

    Ross

  7. newbie

    if you use aquasnap (previously mentioned), it can do the same thing
    just shake your active window to make it always on top
    set the appropriate window transparency beforehand
    i prefer use this way

  8. Dave

    Only problem is on xp the always on top gets turned off if you hit the show desktop icon. Then you have to re-enable always on top manually on the window. In my case i was using always on top with firefox.

  9. Hariks

    @MiezeKater33

    If nobody has noticed, the one liner script iself works as toggle. [ At least in my PC]

  10. Martin Lake

    This is great but I need something like this for Chromebook….it’s one of the few things that keeps me using Windows.

  11. tapt

    Apparently it doesn’t work with Quicktime Player, which is what I am looking for.

  12. yanay

    just fantastic!

Enter Your Email Here to Get Access for Free:

Go check your email!