Skip to content

Commit

Permalink
Merge pull request #1 from reinhello/patch
Browse files Browse the repository at this point in the history
Remove unused code
  • Loading branch information
reinacchi committed Aug 20, 2022
2 parents b22f6c1 + 8f837bd commit e185645
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions quick_mouse.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
; quick_mouse
;
; Reinhardt
; 2022.819.9
; 2022.820.0

global INSERT_MODE := false
global NORMAL_MODE := false
Expand All @@ -20,11 +20,11 @@ Accelerate(velocity, pos, neg) {
If (pos == 0 && neg == 0) {
Return 0
}
; smooth deceleration :)
; Smooth declaration
Else If (pos + neg == 0) {
Return velocity * 0.666
}
; physicszzzzz
; Apply physics /(ㄒoㄒ)/~~
Else {
Return velocity * RESISTANCE + FORCE * (pos + neg)
}
Expand All @@ -50,7 +50,7 @@ MoveCursor() {
VELOCITY_X := Accelerate(VELOCITY_X, LEFT, RIGHT)
VELOCITY_Y := Accelerate(VELOCITY_Y, UP, DOWN)

RestoreDPI:=DllCall("SetThreadDpiAwarenessContext","ptr",-3,"ptr") ; enable per-monitor DPI awareness
RestoreDPI:=DllCall("SetThreadDpiAwarenessContext","ptr",-3,"ptr") ; Enable per-monitor DPI awareness

MouseMove, %VELOCITY_X%, %VELOCITY_Y%, 0, R
}
Expand Down Expand Up @@ -85,7 +85,6 @@ Yank() {
WinGetPos,wx,wy,width,,A
center := wx + width - 180
y := wy + 12
;MsgBox, Hello %width% %center%
MouseMove, center, y
Drag()
}
Expand All @@ -106,21 +105,6 @@ MouseMiddle() {
Click, Middle
}

JumpMiddle() {
CoordMode, Mouse, Screen
MouseMove, (A_ScreenWidth // 2), (A_ScreenHeight // 2)
}

JumpMiddle2() {
CoordMode, Mouse, Screen
MouseMove, (A_ScreenWidth + A_ScreenWidth // 2), (A_ScreenHeight // 2)
}

JumpMiddle3() {
CoordMode, Mouse, Screen
MouseMove, (A_ScreenWidth * 2 + A_ScreenWidth // 2), (A_ScreenHeight // 2)
}

MouseCtrlClick() {
Send, {Ctrl Down}{Click}{Ctrl Up}
}
Expand Down

0 comments on commit e185645

Please sign in to comment.