Skip to content

Instantly share code, notes, and snippets.

@pmirshad
Created April 4, 2011 10:55
Show Gist options
  • Save pmirshad/901468 to your computer and use it in GitHub Desktop.
Save pmirshad/901468 to your computer and use it in GitHub Desktop.
AutoHotKey script for Console2
; Launch console if necessary; hide/show on Win+`
#`::
DetectHiddenWindows, on
IfWinExist ahk_class Console_2_Main
{
IfWinActive ahk_class Console_2_Main
{
WinHide ahk_class Console_2_Main
; need to move the focus somewhere else.
WinActivate ahk_class Shell_TrayWnd
}
else
{
WinShow ahk_class Console_2_Main
WinActivate ahk_class Console_2_Main
}
}
else
Run C:\Progs\Console2\Console.exe
; the above assumes a shortcut in the c:\windows folder to console.exe.
; also assumes console is using the default console.xml file, or
; that the desired config file is set in the shortcut.
DetectHiddenWindows, off
return
; hide console on "esc".
#IfWinActive ahk_class Console_2_Main
esc::
{
WinHide ahk_class Console_2_Main
WinActivate ahk_class Shell_TrayWnd
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment