commit f7e95845891096fd73caa2f3950e9a2fd28155d0 Author: Matthew Welch Date: Sun May 9 12:18:00 2021 -0700 initial commit diff --git a/clicker.ahk b/clicker.ahk new file mode 100644 index 0000000..885b28c --- /dev/null +++ b/clicker.ahk @@ -0,0 +1,46 @@ +#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. + +#MaxThreadsPerHotkey 3 +count := 0 +#z:: +Toggle := !Toggle +WinGetPos, X, Y, Width, Height, A +MouseMove, Width/2, Height/2 +MouseSpeed := 25 +MouseMovement := 30 +Loop +{ + If (!Toggle) + Break + WinGetTitle, Title, A + if (Title = "Idle Champions") { + Click + count += 30 + if (Mod(count, 1020) = 0) { + Send, `` + Send, {Shift Down} + Send, {Alt Down} + Sleep 30 + Send, {F1} {F2} {F3} {F5} {F6} {F7} {F8} {F9} + Send, {Shift Up} + Send, {Alt Up} + Send, {F4} + MouseMove, (Width/2)+MouseMovement, (Height/2)-MouseMovement, MouseSpeed + count := 0 + } + else if (Mod(count, 720) = 0) { + MouseMove, (Width/2)-MouseMovement, (Height/2)-MouseMovement, MouseSpeed + } + else if (Mod(count, 510) = 0) { + MouseMove, (Width/2)-MouseMovement, (Height/2)+MouseMovement, MouseSpeed + } + else if (Mod(count, 240) = 0) { + MouseMove, (Width/2)+MouseMovement, (Height/2)+MouseMovement, MouseSpeed + } + Sleep 30 ; Make this number higher for slower clicks, lower for faster. + } +} +Return