-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchorded-mouse-side-button-hotkey-resize-move-windows.ahk
67 lines (58 loc) · 1.45 KB
/
chorded-mouse-side-button-hotkey-resize-move-windows.ahk
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
SetTitleMatchMode, 2
;Changes the Title match mode to match rather than exact
MakeChord("LButton","XButton1","MoveIt")
MakeChord("LButton","XButton2","SizeBR")
;on my mouse (Logitech G400S which is mx518 / g5 styled) there are two side buttons
;XButton2 is the forwards button and XButton1 is the back button
;to trigger the Resize, hit XButton2 first and then LButton (the left mouse button)
;likewise to trigger the Move, hit XButton1 first and then LButton (the left mouse button)
MakeChord("RButton","XButton1","Trans1")
MakeChord("RButton","XButton2","Trans2")
;based on the above info its pretty easy to try to understand how to use these transparency options
SetKeyDelay(70)
;this is specific to the chord.ahk... the line #include, chord.ahk is present later.
gT:="t"
gW:=2
gH:=3
gX:=4
gY:=5
#IfWinActive cmd.exe
;paste in cmd prompt with normal Ctrl+V shortcut
^v::
CoordMode, Mouse, Relative
WinGetActiveStats, gT,gW,gH,gX,gY
MouseMove, gW-75,gH-50,0
Sleep 20
Send {RButton}
Send p
Return
#IfWinActive chrome
XButton2::
tooltip, whoops
sleep 800
tooltip,
Return
;if you're doing something serious in the browser you'd better not accidentally hit the back button.
#IfWinActive
;resets IfWinActive to apply to anything
MoveIt:
Send !{Space}r
sleep 30
Send !{Space}m
Sleep 30
Send {Up}
Return
SizeBR:
Send !{Space}r
Sleep 30
Send !{Space}s
Sleep 30
Send {down}{right}
Return
#include, chord.ahk
Trans1:
WinSet, Trans, 200, A
Return
Trans2:
WinSet, Trans, 255, A
Return