;示例1:启动notepad
;#n::Run Notepad
;示例2:启动notapad++
;esc::
; path = D:\package\Notepad++\notepad++.exe
; file = D:\package\file.txt
;run %path% "file" |
;return
;示例3:启动total_cmd
#t::
DetectHiddenWindows, on
IfWinNotExist ahk_class TTOTAL_CMD
Run d:\Program Files\tc\TOTALCMD.EXE
Else
IfWinNotActive ahk_class TTOTAL_CMD
WinActivate
Else
WinMinimize
Return
;示例3:启动 cad
#a::
DetectHiddenWindows, on
IfWinNotExist ahk_class AfxMDIFrame90u
Run D:\Program Files\Autodesk\AutoCAD 2012 - Simplified Chinese\acad.exe
Else
IfWinNotActive ahk_class AfxMDIFrame90u
{
WinActivate
WinMaximizew
}
Else
WinMinimize
Return