; Launch console if necessary; hide/show on F12
F12::
DetectHiddenWindows, on
IfWinExist ahk_class Console Main Command Window
{
IfWinActive ahk_class Console Main Command Window
{
WinHide ahk_class Console Main Command Window
; need to move the focus somewhere else.
WinActivate ahk_class Shell_TrayWnd
}
else
{
WinShow ahk_class Console Main Command Window
WinActivate ahk_class Console Main Command Window
}
}
else
Run U:\Console\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 Main Command Window
esc::
{
WinHide ahk_class Console Main Command Window
WinActivate ahk_class Shell_TrayWnd
}
return