
RANDOM INTERVAL AUTO CLICKER REDDIT CODE
Fun fact! If you try to use both normal hotkeys and sc code hotkeys it one script, some of the two will straight up not work! So it's go all the way or stop all the way lol. Used to have some irregularities with the normal ones so I wrote a script that places the sc code of the key I want into my clipboard and always use SC codes. I switched to scan codes because with that I'm focusing on keyboard keys specifically rather than the virtual keys. I literally pressed the button though 😭😭😭 why does it keep not workinggggg Puts the 4 spaces before each line for you.Īnd it keeps your formatting, making it readable.Īnd you don't have to sit there and grave accent every single line.Įdit: Parenthesis got deleted on accident. SetTimer, % A_ThisFunc, -50 Set a timer to run this again in 50 msĪlso, posting code is a lot easier if you highlight it and hit reddit's code button. Random, index, % points.MinIndex(), % points.MaxIndex() Randomly choose an index using point's min and maxĬontrolClick, % "x" points.x " y" points.y Then click using that point's x & y vals Points := set_points() If toggle is on, get a reference to the points object (flop ? toggle := !toggle : "") If flop is true, toggle the toggle var

Static toggle := 0 Var to track if autoclick is active Return points Always return pointer to array MouseGetPos, x1, y1 else if (x2 = "" AND y2 = "") MouseGetPos, x2, y2 else if (x3 = "" AND 圓 = "") MouseGetPos, x3, 圓 return Start the autoclicking loop #If (isLoopStarted = False) !+SC020:: isLoopStarted := True Loop ) Add to array SetBatchLines, -1 CoordMode, Mouse, Relative Variables isLoopStarted := False x1 := y1 := x2 := y2 := x3 := 圓 := Shift alt right click to choose position, up to three positions !+RButton:: if (x1 = "" AND y1 = "") #SingleInstance,Force Only launch 1 instance of this script. SetWorkingDir %A_ScriptDir% Ensures a consistent starting directory. SendMode Input Recommended for new scripts due to its superior speed and reliability. #Warn Enable warnings to assist with detecting common errors. #NoEnv Recommended for performance and compatibility with future AutoHotkey releases. Any ideas or advice are largely appreciated.
RANDOM INTERVAL AUTO CLICKER REDDIT HOW TO
Pretty sure it doesn't actually affect how well it works though, but I'd like to know how to write what I've written in a better fashion. While this works, and exactly how I wanted this to work, my code is written pretty stupidly.

So for this to be usable, you would put a hotkey to run this script in your main script, which I'd recommend be shift alt D as well for simplicity. How this works: you start the script, then pick the places to click on using shift alt Right mouse button, press shift alt D again to start the clicking loop and then press the same combination again to turn off the script. Main Stickied Post (Has solutions to common issues).It covers most of the basic concepts of AutoHotkey. WebIRC (Browser Based) The IRC is currently closed for maintenance.Ĭheck out the AHK beginners tutorial. If you'd prefer trying to get help from a live person, check out the IRC or Discord channels. Link to AutoHotkey's Command and Syntax Documentation Live Chat (IRC / Discord) Make sure you keep your version of AHK up to date. If your post has been resolved please flair it "Solved!".Put 4 spaces (or a TAB) before each line of code in the block.Code block must have a blank line at the top and bottom.This makes it easier for us to help you.

