Terms of Use For FixedByVonnie

By proceeding to access fixedByVonnie.com, you expressly acknowledge, and agree to, all of the following:

fixedByVonnie.com is a personal website and blog owned by Security Plus Pro LLC, which is being presented for informational purposes only. The views on this website are solely those of the website owner (and not those of any employer or of any professional associations affiliated with the website owner).  Any views expressed in this website and any information presented on this website, or in any of its blog entries, should not be relied on for any purpose whatsoever other than as the personal opinions of the website owner.  The website owner expressly disclaims any and all liability for any information presented on this site.  The owner of this website and its blog posts shall not be held liable, and shall be held harmless, for any errors or omissions in any information or representations contained in this website, or in any of its blog entries.  The website owner also expressly disclaims any liability for the current or future availability of any such information. The website owner makes no representations as to the accuracy or completeness of any information on this website or which may be found by following any link on this website. The website owner shall not be held liable for any losses, injuries, damages, claims, or causes of action, from the display or use of any information on this website or in any of its blog entries. If you use the information on this website, or on any of its blog entries, you do so solely at your own risk.

1 simple way to keep a window always on top in Windows - fixedByVonnie

1 simple way to keep a window always on top in Windows

I’m not going to waste any time on this; let me show you how to force a window to be always on top.

Go to http://www.autohotkey.com and download the application.

AutoHotkey is a reputable program that lets you create scripts and macros for your desktop You can remap keys and define specific hotkeys for your mouse and keyboard or even create text completion strings. (For example, ::btw:: becomes by the way)

There’s loads of stuff you can do with it but for now we’re just going to use it to lock a specific window on top of all your other windows.

When the installer pops on the screen, keep all the defaults and click Install.

AutoHotkey setup

Launch the app.  The icon is a green square with a white H in the center.  If you can’t find it, just hit the Windows Logo key on your keyboard and type in:

autohotkey

Launching Autohotkey

Now it’s time for the fun part.

The first time you launch, it’ll ask you for permission to create a sample script.  Click Yes or else AutoHotkey will automatically close.

Create autohotkey sample script

A window will open in a file called AutoHotkey.ahk.  This is a sample script that we’re going to replace with our always on top code.

Select all the text and delete it.

Autohotkey.ahk default script

Now paste in the following code and save the file.

^SPACE::  Winset, Alwaysontop, , A

Autohotkey always top script

I know the text looks weird so let me break it down real fast:

The first part, ^SPACE:: means trigger the action by pressing: Ctrl + Space.

But wait, how did I know that? It turns out that AutoHotkey has a nice reference that matches major symbols to keys.  Give it a quick read and I promise you’ll feel more comfortable with the AutoHotkey syntax.

For example, if you wanted to change the key trigger from Ctrl + Space to Alt + Space you would change the script beginning to !SPACE:: 

Just make sure you don’t override any existing keyboard shortcuts that you want to keep.

Okay, so let’s continue looking at the script:

Winset

The Winset command is perfect for Always on top because it lets you change the behavior of a specific window.

, AlwaysOnTop

Next we follow that with an attribute, value pair.  Since we want to force the window on top of everything else, we simply specify the AlwaysOnTop attribute.

, , A

This part looks a little funny but that’s because we’re leaving the value portion blank.  By default, if you omit the AlwaysOnTop value it’ll default to TOGGLE.  So each time we press Ctrl + Space the window will toggle from being forced on top to being normal.

The A means apply the settings to the Active Window.

Here’s the script again:

^SPACE::  Winset, Alwaysontop, , A

Alright, now make sure you save the script then look for the AutoHotKey “H” icon in the system tray.

Right click that and choose Reload This Script.

Reload Autohotkey script

Now go find a Window you want to force on top and press Ctrl + Space.

Let’s see… I’m going to force Outlook 2013 to be always on top…

Always on top

Nice!

Now you can keep your password manager, Chrome, or video player on top of all your other windows with a simple and 100% configurable keystroke combo.  And do you know the nicest part of it all?

It takes up virtual zero system resources.  AutoHotkey won’t slow down your computer.

AutohotKey takes up zero space

Oh yeah, and remember: if you ever forget the hotkey combination, you can always right click the AutoHotkey icon in the tray and choose Edit Script from the context menu.

That’s all – thanks for reading!

About

Connect with Vonnie on Twitter

Posted in Windows, Windows 7, Windows 8, Windows 8.1 Tagged with: ,
  • Christopher Talbot

    This doesn’t work when it comes to full screen applications or anything Metro related, any way around this?

  • Sanjaya

    Thank you…

  • Luke Marshall

    Dude I just added it works great for what i need it for, toggle works and every thing. I got turned on to autohot key about 2 years ago and I’ve used it everyday since . by far the most useful tool i have >

    ^!p::
    Send {PrintScreen}
    Run mspaint
    Sleep, 2000
    IfWinExist Untitled – Paint
    {
    WinActivate
    Send, {CTRLDOWN}v{CTRLUP}
    return
    }
    else
    {
    MsgBox No paint found.
    }
    return

    ^!L::
    Send {PrintScreen}
    Run mspaint
    Sleep, 2000
    IfWinExist Untitled – Paint
    {
    WinActivate
    Send, {CTRLDOWN}v{CTRLUP}
    Sleep, 1000
    Send, {F12}
    Sleep, 1000
    Send, Screen Shot
    return
    }
    else
    {
    MsgBox No paint found.
    }
    return

    Great screen grab code