通过AutoHotkey快速启动KeePass并在当前页面自动输入密码,首先自定义函数,方便多个程序下调用。
keepass()
{
DetectHiddenWindows, On
IfWinExist Data.kdbx
{
Send ^!a
}
else
{
DetectHiddenWindows, On
IfWinExist ahk_class WindowsForms10.Window.8.app.0.2bf8098_r13_ad1
{
Send ^!k
IfWinNotActive 打开数据库
{
Send ^!k
}
WinWait 打开数据库
Send www.haiyun.me{Enter}
Sleep 1000
Send ^!a
}
else
{
Run D:\Program Files\KeePass\KeePass.exe
WinWait 打开数据库
WinActivate
Send www.haiyun.me{Enter}
Sleep 1000
Send ^!a
}
}
}
在火狐下通过快捷键调用KeePass快速输入密码,其它浏览器更改Ahk_Class:
#IfWinActive ahk_class MozillaWindowClass
::/p::
keepass()
Return
标签:autohotkey, firefox, 火狐, keepass, autohotkey调用keepass快速输入密码