AutoHotkey调用KeePass快速输入密码

http://www.haiyun.me/archives/autohotkey-keepass-auto-input-password.html

发布时间:March 2, 2013 

通过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


你可能感兴趣的:(AHK,AutoHotkey)