Autohotkey常用命令

时间:2023-03-09 22:18:12
Autohotkey常用命令

//输入密码
#1::
send test1234
sleep 600
send {enter}
return

//打开程序
; win + t: open total cmd
#t::
IfWinNotExist ahk_class TotalCmd
{
Run "D:\Program Files\totalcmd\TOTALCMD64.EXE"
WinActivate
}
Else IfWinNotActive ahk_class TotalCmd
{
WinActivate
}
Else
{
WinMinimize
}
Return

; win + w: open company chat
#w::
IfWinNotExist ahk_class TotalCmd
{
Run "C:\Program Files (x86)\WXWork\WXWork.exe"
WinActivate
}
Else IfWinNotActive ahk_class TotalCmd
{
WinActivate
}
Else
{
WinMinimize
}
Return

#F::
IfWinNotExist ahk_class Firefox
{
Run "C:\Program Files\Firefox\firefox.exe"
WinActivate
}
Else IfWinNotActive ahk_class Firefox
{
WinActivate
}
Else
{
WinMinimize
}
Return

; win + p: open total cmd
#p::
IfWinNotExist ahk_class ProcessHacker
{
Run "D:\Program Files\Process Hacker 2\ProcessHacker.exe"
WinActivate
}
Else IfWinNotActive ahk_class ProcessHacker
{
WinActivate
}
Else
{
WinMinimize
}

Return

//关闭程序

;;close current process :ctrl+alt + f4
;;^!F4::
#Q::
WinGet, active_id, PID, A
run, taskkill /PID %active_id% /F,,Hide
return