Created
November 24, 2019 17:13
-
-
Save ntrp/bbd79b33772713f2f21d55c8c9ab344e to your computer and use it in GitHub Desktop.
Windows Console show/hide shortcut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
F1:: | |
DetectHiddenWindows, on | |
IfWinExist, ahk_exe Arch.exe | |
{ | |
IfWinActive, ahk_exe Arch.exe | |
{ | |
WinHide, ahk_exe Arch.exe | |
SetTimer, ActivateLastWindow, 100 | |
} else { | |
WinGet, winid,, A | |
WinShow, ahk_exe Arch.exe | |
WinActivate, ahk_exe Arch.exe | |
} | |
} else { | |
WinGet, winid,, A | |
Run, Arch.exe, , max | |
} | |
DetectHiddenWindows, off | |
return | |
ActivateLastWindow: | |
WinActivate, ahk_id %winid% | |
SetTimer, ActivateLastWindow, off | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment