Skip to main content
返回指南

Background running super fast Auto"clicker" (ahk v1.1)

AproneAprone
(63 ratings)
Mar 6 @ 9:35am1,85960
AchievementsEnglish
Version 2: How to Set it up and use it
If the first one doesnt work or you simply want to have an even better and smoother Version.

Pros:
  • I'm Pressing the Keys F13 to F24 so you can just do anything you want on your computer with it barely interfering you (no Combination of Keys work for example ctrl+v)
  • It is even faster my own Test resulted in 1.000 Beats per 5-6 seconds so a smooth 1.000.000 Million per ~1.5 Hours (might vary from PC to PC)

What some might see as a Con:
  • It will be creating 12 Scripts at the Folder where you're running the Masterscript from, they're all very simple Sendinput-Scripts but that way you dont have to create them yourself.
  • It does take ~30mb of load onto your RAM (probably also does vary from PC to PC) but not alot considering Bongocat takes up ~600MB already.


Just like in the first Part please download Autohotkey Version 1.1 [www.autohotkey.com] if you havent done so already.
And then simply create a new Textdocument (Editor, Notepad++, etc.) Copy Paste the following Segment - the name you give it doesnt matter but use the suffix ".ahk" instead of ".txt".

#NoEnv SetBatchLines -1 SetWorkingDir %A_ScriptDir% keys = ( F13 F14 F15 F16 F17 F18 F19 F20 F21 F22 F23 F24 ) ; --- create worker scripts --- Loop, Parse, keys, `n { key := A_LoopField if (key = "") continue file := "spam_" key ".ahk" if !FileExist(file) { script = ( Loop { SendInput {%key% down} Sleep 25 SendInput {%key% up} Sleep 25 } return $F12::ExitApp ) FileAppend, %script%, %file% } } toggle := false $1:: toggle := !toggle if (toggle) { i := 0 Loop, Parse, keys, `n { key := A_LoopField if (key = "") continue i++ Run, "%A_AhkPath%" "%A_ScriptDir%\spam_%key%.ahk",,, pid%i% Sleep 30 } } else { Loop, %i% Process, Close, % pid%A_Index% } return Esc:: Loop, %i% { Process, Close, % pid%A_Index% } ExitApp

How does it work?
Double click the Masterscript you had created (this initiates the Creation of the 12 Workerscripts), then you can Press the Key "1" (not Numpad) on your Keyboard and all 12 Workerscripts will start.
Pressing "1" again exits the Workerscripts and only toggles Off the Masterscript, so just press "1" again to start again or just press "ESC" to also take off the Masterscript.

tl:dr
1. Double Click/Exeute Masterscript
2. Toggle on/off = "1´" (not Numpad)
3. Esc = Close all Workers + Master
4. F10 = Each press Closes 1 Worker

After you're done with the Script dont forget to just delete the 12 Workerscripts aswell.

Here my Result of having used these Scripts, obviously i didnt have them on permanently, but i think its still good.



Hitting 100M before finishing the 100 Trades ._.



Have fun with it (even if it will only be shortwhile :P)
Version 2: You get an Error or maybe it just doesnt work, i'm trying to help you here!
First things first, make sure you had downloaded Version 1.1 of Autohotkey the executable for it should be named something like AutoHotkey_1.1.37.02_setup.exe.
Because Autohotkey changed how some Code has to be written in order to be Interpreted correctly for Version 2.

  1. I'm pressing the Button you told me but it issnt starting!
    • There seems to be differences in terms of Keyboard Key-Acceptances around the World, to be able to fix that try changing the "1"-Key to a different one lets say for example F9 here is how to do it:
      Find the following Line
      $1::
      and change it to
      $F9::
  2. Error! My Script suddenly stopped working and is telling me that it cant find the Workerscripts even tho they're there.
    • I have already implemented a fix for that in the Masterscript please just copy paste the new one over in your Masterscript. :)
  3. I do have functions on one of my F-Keys you're using in your Script how can i change that?
    • I have also already change the Script to be more versitale in that direction just copy paste the new one over in your Masterscript.
    • Now you have to find the Part where it lists the Keys its pretty obvious
      keys = ( F13 F14 F15 F16 F17 F18 F19 F20 F21 F22 F23 F24 )
      Just remove the Keys you dont want to be pressed.
    • But Aprone?! you're telling me i can simply Change that, can i also add more Keys??
      Originally posted by author:
      To that i say, yes it is versitale in accpeting and firing even more Keys and YES it does get EVEN faster BUT please keep in mind that too many Inputs firing will create a Backlog of Keys to be pressed on Windows. So running even more will create issues the longer it goes (i didnt have any with just these 12). Having Key-Inputs Qeued up in Windows will make it unresponsible to your own Key-Inputs, so turning the Script off can take a while longer depending on how long you had it running and even if you turn it off a different way it will still fire until the Qeue is emptied out. It will also remove the Abilitiy to be run in the Background and i am currently just firing Keys that dont or just rarely ever have a function.
  4. I am using your Script-Version 1/2 but BongoCat doesnt respond even tho the Keys are being pressed
    • Checkout my other Version, it might fix it for you! :)
Verison 1: How to set it up ? (deprecated - only when Version 2 doesnt work)
After you have downloaded Autohotkey v1.1 simply open a new Text File (Editor, Notepad++, etc.), insert the following Code and save the File with the suffix ".ahk" (instead of ".txt").
You can name it however you like.

#NoEnv #MaxHotkeysPerInterval 999999999 #KeyHistory 0 ListLines Off SetBatchLines -1 Process, Priority,, High toggle := false DllCall("winmm\timeBeginPeriod","UInt",1) $1:: toggle := !toggle if (toggle) { SetTimer, Engine1, 1 SetTimer, Engine2, 1 SetTimer, Engine3, 1 SetTimer, Engine4, 1 SetTimer, Engine5, 1 } else { SetTimer, Engine1, Off SetTimer, Engine2, Off SetTimer, Engine3, Off SetTimer, Engine4, Off SetTimer, Engine5, Off } return Engine1: SpamInput() return Engine2: SpamInput() return Engine3: SpamInput() return Engine4: SpamInput() return Engine5: SpamInput() return SpamInput() { ; random letter A-Z Random, vk, 65, 90 ; key down DllCall("keybd_event","UChar",vk,"UChar",0,"UInt",0,"UPtr",0) ; mouse spam while key held MouseClickDLL(0x02,0x04) ; left ; extremely small delay Sleep 0 ; key up DllCall("keybd_event","UChar",vk,"UChar",0,"UInt",2,"UPtr",0) } MouseClickDLL(down,up) { DllCall("mouse_event","UInt",down,"UInt",0,"UInt",0,"UInt",0,"UPtr",0) DllCall("mouse_event","UInt",up,"UInt",0,"UInt",0,"UInt",0,"UPtr",0) } $F10:: toggle := false SetTimer, Engine1, Off SetTimer, Engine2, Off SetTimer, Engine3, Off SetTimer, Engine4, Off SetTimer, Engine5, Off DllCall("winmm\timeEndPeriod","UInt",1) ExitApp
Version 1: How to use it ? (deprecated - only when Version 2 doesnt work)
After executing it (double click), with the Key "1" (not Numpad) you can toggle it on or off without completely ending the script.
With "F10" you can end the script entirely.
Version 1: Tips (deprecated - only when Version 2 doesnt work)
I suggest running the Script with something in the Background of the Mouse that doesnt care about Spam text, or does in only a negligable way, like an empty text file. (Incase you accidentally move your mouse to a different position)

You can get even faster, which is a "simple" just run the script several times.
Now here is the issue, for Autohotkey to run several Scripts they all need to have a different Toggle Key.
You can change the Toggle Key in Line 12 like so:
$1::
Simply turn this line to a different Key you want to have as a toggle for simplicity lets say Key 2 (not Numpad)
$2::
I had tried if more "engines" inside the script to increase the efficiency of it, but sadly it didnt matter maybe it is a Autohotkey limitation per singular script. But yeah just run it several times on different Toggles and you're golden!!!
From Personal Testing
Scripts
Time for 1.000 Clicks
Time for 1.000.000 Clicks
1
35 Seconds
~10 Hours
2
21 Seconds
~5.9 Hours
3
17 Seconds
~4.8 Hours
4
14,5 Seconds
~4 Hours

Edit:
To get it EVEN faster:
When you're running the script several times, try changing the Keys that half of the scripts are using from "A-Z" to "F13-F24". Since they're genuinly different Keys the game will accept them as different Input and using both varians together has given me a huge boost.
Please make sure that you're not having any Functions on these F-Keys it is very unlikely but still possible (usually when you didnt program them yourselves it is unlikely)
You can do it in the line 55 (and 54) like so
; random letter A-Z Random, vk, 65, 90
change it to
; random key F13–F24 Random, vk, 124, 135
If you actually do have Key-Functions on F13/F14 you can also use "Random, vk, 126, 135", so it is only F15-F24.


I'm sorta new to coding so forgive my not so perfect code, as it still does what it has to do.
Happy Clicking :P