As always, make sure you've fully read the disclaimer so that you understand our policy BEFORE reading this article!

Stealth - Hide / Restore Hotkey

Ever been somewhere where you wanted privacy, because you want to browse the internet freely or play a video but don’t want to get caught? (Like at work? 😉 ) Let us show you how to create the ultimate hotkey macro to allow you to hide all those applications via the click of just one button!

AutoHotkey

AutoHotkey is a Windows program, that when installed, allows you to write a script/config assigning keyboard and/or mouse presses to various actions. It’s purpose extends much further then we’re going to cover, but AutoHotkey is easily the best way to hide/restore applications you don’t want seen. So much so, that I’m not going to show any others (at least for Windows). Now, let’s get started.

Installation & Configuration

  1. Download & install AutoHotkey
  2. After installing, right click on your desktop (or in some folder)
    1. Select “New” -> “AutoHotkey Script”
    2. Give it a non-suspicious name
  3. Open the file you just created with a text editor (like Notepad)
    1. Delete all of the files contents
    2. Paste the below script into the file & save it
CapsLock::
{
	HideStuff()
	Return
}

XButton1::
{
	HideStuff()
	Return
}

HideStuff() {
	WinTitle = GuildWars
	WinTitle2 = Ys Origin

	If (WinVisible(WinTitle) or WinVisible(WinTitle2))
	{
		WinHide %WinTitle%
		WinHide %WinTitle2%
	} else { 
		WinShow %WinTitle%
		WinShow %WinTitle2%
	}
	Return
}

WinVisible(Title) {
	DetectHiddenWindows Off ; Force to not detect hidden windows
	Return WinExist(Title) ; Return 0 for hidden windows or the ahk_id
	DetectHiddenWindows On ; Return to "normal" state
}

The above script will completely hide anything that starts with GuildWars or Ys Origin when I hit Caps Lock or one of the extra side buttons on my mouse. When I hit the button again, both will un-hide if they were previously hidden.

Now you’re ready to customize the script to suit your own needs. The code should be pretty self explanatory but there are a few points I’ll point out for you to make sure you understand them.

1) CapsLock:: and XButton1:: are the keyboard or mouse buttons you want to set the hide/un-hide to. To change this to another keyboard or mouse button, just do something like “F6::“. Go here if you want to learn more about the possible combinations.

2) WinHide actually hides the application so it’s not just minimized. This makes it super-sneaky, but if you prefer to just minimize the applications, use WinMinimize. You can hide, minimize, show as many applications as you want.

3) WinVisible is just a simple function I made to test if a program is currently hidden or not. This way, you don’t have to use two buttons, one to hide and one to un-hide. Instead, you use one button and if the program is visible then it hides it. Otherwise, if the program is hidden behind the scenes, when you hit the button it will show it again.

4) (Optional) It’s not shown above, but if you want to open a program like Excel every time you hide your other programs, just note that Run is better to use than the alternate WinActivate, because if the program isn’t already running, it will open it for you. And if it is already running, it still switches to it. Just give it a path to the application that you want to open up (to pretend like you’re working… or something.. 😉 )

Now to run it: Just double click the file and then test the hotkey’s you just made.  Every time you alter that file, you’ll need to double click it again to install it over top of the old version. When it prompts you, just hit yes.

Portable

Just right click the .ahk file you’ve already created and hit Compile Script. It will compile the .ahk into a .exe that you can put on a portable drive or use anywhere you like.

Demonstration