$^#LButton:: k_path:="" ; путь к KeePass f_path:="" ; путь к базе данных ps:="" ; пароль к ней KeyWait Ctrl, T0.8 e:=ErrorLevel KeyWait LWin, T1 If !e { WinGetActiveTitle bt MouseGetPos xc, yc, id clip_old:=Clipboard, Clipboard:="" Send ^{vk4C} Sleep 300 Send ^{Ins} ClipWait 0.5 add:=Clipboard If add~="^\S+://\S+$" WinSetTitle ahk_id %id%, ,% RegExReplace(bt," \[\S+?://\S+?]$") " [" add "]" Clipboard:=clip_old } Process Exist, KeePass.exe If !Errorlevel && k_path && f_path { If ps ps:="-pw:" ps min:="" If !e min:="-minimize" SetWorkingDir %A_ScriptDir% Run "%k_path%" "%f_path%" %ps% %min% SetTitleMatchMode, 2 WinWait - KeePass, , 120 If e || Errorlevel return } Process Exist, KeePass.exe If Errorlevel { Sleep 500 WinActivate ahk_id %id% MouseClick, ,% xc+3,% yc Send ^!{vk41} } return |