From f7e95845891096fd73caa2f3950e9a2fd28155d0 Mon Sep 17 00:00:00 2001 From: Matthew Welch Date: Sun, 9 May 2021 12:18:00 -0700 Subject: [PATCH] initial commit --- clicker.ahk | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 clicker.ahk 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