Menu Close

Keep A Window On Top

It often happens that when working on a Windows PC you want to keep one window on top of all others. For instance, to compare and edit text from another open window. Well, you can do this using the excellent and useful AutoHotkey program. Using this program you can make a simple script that sets your currently active window to be always on top when you press a certain key combination. The resulting script is lightweight and won’t use much resources or add unnecessary clutter to your system. You can even use AutoHotkey to compile the script to its own executable if you don’t want to keep the full AutoHotkey program running—or if you want an easy way to carry the script with you to other PCs.

First, you’ll need download and install AutoHotkey.

When that’s done, you’ll need to create a new script. To do that, right-click anywhere on your desktop or in a File Explorer window, point to the “New” menu, and then select the “AutoHotkey Script” option.

Give the new script file whatever name you want, then click “Edit.” When prompted, open the script in Notepad.

In the Notepad window, paste the following line of code. Then save and close the script.


^space::
{
WinSetAlwaysOnTop -1, "A"
}

Next, double-click your script to run it. You’ll know it’s running because a green “H” logo appears in your system tray to let you know it’s running as a background process.

You can now press Ctrl+Space to set any currently active window to be always on top. Press Ctrl+Space again set the window to no longer be always on top. If you don’t like the Ctrl+Space combination, you can change the ^SPACE part of the script to set a new keyboard shortcut. Consult the Hotkeys documentation on AutoHotkey’s website for help.

Views: Today 1 | Total 3
0 Shares

Leave a Reply

Your email address will not be published. Required fields are marked *

Copy link
Powered by Social Snap