- Nov 6, 2017
- 5
- 2
In the interest of preventing RSI I'll suggest using a macro like AHK and the following script. Rename your game folder into something other than 'Slave Matrix', then load up the script.
It binds Lmouse+circular movement to your E button and Mmouse scrolling to your W button. Tapping the same button stops the action. And if you happen to be on some other screen when you hit either of those keys, it suspends the script so your mouse doesn't spaz out if you forget to turn the script off before doing something else on your PC. Worst case, ESC is your kill switch.
If you want 'faster results', just move your mouse in addition to the scripted E movement.
Partial credit goes to someone on the AHK forum, though he might be better off ignorant methinks. Enjoy:
Edited to insert code block
It binds Lmouse+circular movement to your E button and Mmouse scrolling to your W button. Tapping the same button stops the action. And if you happen to be on some other screen when you hit either of those keys, it suspends the script so your mouse doesn't spaz out if you forget to turn the script off before doing something else on your PC. Worst case, ESC is your kill switch.
If you want 'faster results', just move your mouse in addition to the scripted E movement.
Partial credit goes to someone on the AHK forum, though he might be better off ignorant methinks. Enjoy:
Code:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
MouseMove_Ellipse(X1, Y1, X2, Y2, S=1, M=0, I="") {
MouseGetPos, X0, Y0
If(I="")
Random, I, 0, 1
X1 := (X1 != "") ? X1 : X0, Y1 := (Y1 != "") ? Y1 : Y0, B := Abs(X1-X2), A := Abs(Y1-Y2), H := (X1<X2) ? ((Y1<Y2) ? ((I=0) ? X1:X2):((I=0) ? X2:X1)):((Y1<Y2) ? ((I=0) ? X2:X1):((I=0) ? X1:X2)), K := (Y1<Y2) ? ((X1<X2) ? ((I=0) ? Y2:Y1):((I=0) ? Y1:Y2)):((X1<X2) ? ((I=0) ? Y1:Y2):((I=0) ? Y2:Y1)), D := A_MouseDelay
SetMouseDelay, 1
If(M)
BlockInput, Mouse
If(B > A)
Loop, % B / S
{
M := (X1 < X2) ? ((I=0) ? -1:1):((I=0) ? 1:-1), X := (X1 < X2) ? (X1+A_Index*S) : (X1-A_Index*S), Y := M*Sqrt(A**2*((X-H)**2/B**2-1)*-1)+K
MouseMove, %X%, %Y%, 0
}
Else
Loop, % A / S
{
M := (Y1 < Y2) ? ((I=0) ? 1:-1):((I=0) ? -1:1), Y := (Y1 < Y2) ? (Y1+A_Index*S) : (Y1-A_Index*S), X := M*Sqrt(B**2*(1-(Y-K)**2/A**2))+H
MouseMove, %X%, %Y%, 0
}
MouseMove, %X2%, %Y2%, 0
BlockInput, Off
SetMouseDelay, % D
}
Escape::
ExitApp
Return
CoordMode, Mouse, Screen
SetBatchLines, -1
e::
IfWinActive, Slave Matrix
SetTimer, circle, % (stop:=!stop) ? "Off" : -1 ; Press e to toggle on/off.
else
Suspend
return
circle:
Loop
{
Click, down
MouseGetPos, X, Y
Random, I, 0, 1 ;Random ellipse invert.
MouseMove_Ellipse(X, Y, X+200, Y+200, 1, 0, I)
MouseMove_Ellipse(X+200, Y+200, X, Y+400, 1, 0, I)
MouseMove_Ellipse(X, Y+400, X-200, Y+200, 1, 0, I)
MouseMove_Ellipse(X-200, Y+200, X, Y, 1, 0, I)
}until Stop
Click, up
Return
w::
IfWinActive, Slave Matrix
SetTimer, rolling, % (stop:=!stop) ? "Off" : -1 ; Press w to toggle on/off.
else
Suspend
return
rolling:
Loop
{
Send {WheelUp 4}
Sleep 50
Send {WheelDown 4}
Sleep 50
}until Stop
Return