-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathapp_bitwarden.ahk
More file actions
31 lines (29 loc) · 1000 Bytes
/
app_bitwarden.ahk
File metadata and controls
31 lines (29 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
;-------------------------------------------------
; Bitwarden Shortcuts which they won't implement for some stupid reason
#HotIf WinActive(WinTitles.Bitwarden)
; Helper: click an image within the Bitwarden window bounds
bitwardenClickImage(imgPath) {
CoordMode "Pixel", "Screen"
CoordMode "Mouse", "Screen"
SendMode "Event"
MouseGetPos &x, &y
WinGetPos &wx, &wy, &ww, &wh, WinTitles.Bitwarden
x1 := wx
y1 := wy
x2 := wx + ww - 1
y2 := wy + wh - 1
if ImageSearch(&ix, &iy, x1, y1, x2, y2, imgPath) {
MouseMove ix, iy, 5
Send "{LButton}"
MouseMove x, y, 5
return true
} else {
Tippy("Image `"" . imgPath . "`" was not found.")
return false
}
}
#HotIf WinActive(WinTitles.Bitwarden)
^e::bitwardenClickImage("resources/BW - Bitwarden Edit Button.png")
^s::bitwardenClickImage("resources/BW - Bitwarden Save Button.png")
^d::bitwardenClickImage("resources/BW - Bitwarden Delete Button.png")
#HotIf