我最常用的AutoHotKey脚本分享。
- 使普通Edit控件也支持Ctrl + Backspace,来自AHK帮助。
; Enable Ctrl+Backsp in any edit control.
#If ActiveControlIsOfClass("Edit")
^BS::Send ^+{Left}{Del}
^Del::Send ^+{Right}{Del}
#If ; End of Class("Edit")
- 统一的窗口最小化快捷方式。
通过Shift + ECS来WinMinimize最小化窗口,特定窗口使用WinClose最小化窗口。
; Shift + Esc : Minimize Current Active Window.
; Get ahk_class name in spyxx.exe or spyxx_amd64.exe
+Esc::
{
If WinActive("ahk_class TFoxMainFrm.UnicodeClass")
or WinActive("ahk_class YodaoMainWndClass")
or WinActive("ahk_class NeteaseYoudaoYNoteMainWnd")
{
WinClose, A ; "A" for current window.
Return
}
WinMinimize, A
Return
}
- 启动激活隐藏窗口。 函数RunActiveHide,未启动时激活,未激活时激活,激活时最小化或关闭。
#Q::RunActiveHide("TFoxMainFrm.UnicodeClass", "D:\Program Files\Foxmail\Foxmail.exe", true)
#`::RunActiveHide("TTOTAL_CMD", "C:\Program Files\TotalCmd\TOTALCMD64.EXE")
RunActiveHide(CLASS, PATH, CLOSE = false)
{
IfWinNotExist ahk_class %CLASS%
{
Run %PATH%
Return
}
IfWinNotActive ahk_class %CLASS%
{
WinActivate
Return
}
If !CLOSE
WinMinimize
Else
WinClose
Return
}
- 待续…