Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

The definitive autofire thread!

  • Please log in to reply
130 replies to this topic
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008

If I wanted faster input, I would be more interested in "as fast as possible" than the arbitrary and relatively slow repeat rate of 10 keys per second.

It's not necessarily about faster input, it's about input that can get past any input detection software; that might not be a concern for you in your situation but it is a concern for a wide swath of gamers. If you go straight to "as fast as possible" many games are going to snuff you pretty quickly.

And a good typist will complete the press of a keyboard key at around 120ms, and the press of a mouse button at around 100ms, so I would expect that the delay between keystrokes will be closer to 100ms than 1ms (which is actually 10-15ms due to OS granularity).

  • Members
  • 587 posts
  • Last active: Oct 21 2014 05:13 PM
  • Joined: 17 Feb 2011

In that case, the only solutions are to either use the SetTimer toggle method instead, or to press the key for a period of time shorter than the key-repeat wait time. I'll update the OP.

Perhaps you could use this:

Warning: If the hotkey used by the Toggle is input faster than the loop executes, the maximum number of simultaneous threads per hotkey can be exceeded, which leaves the execution "stuck" in a spamming state (reference Leef_me's explanation).

  • Guests
  • Last active:
  • Joined: --
Ok, I am having some problems. What I want to do is execute a keypress AFTER the left mouse button has been held down for more than a second or so. I have tried the examples in the first page and ones I saw elsewhere, and finally came up with a combo. It works as expected with letter keys, and the right mouse button. However, it doesnt seem to work with the left mouse button. If I hold it down it just selects and deselects text repeatedly. If anyone can help it would be much appreciated

Heres what I have, and like i said if i replace LButton with RButton or a key, it works fine.
doneloop := 0
    GetKeyState, var, LButton, P
    If var = U
        send {LButton up}
        doneloop := 0
    send {LButton down}
    sleep 100
    If doneloop < 10
    GetKeyState, var, LButton, P
    If var = D
	If doneloop = 10
           Send 3

  • Guests
  • Last active:
  • Joined: --
Also I feel like I should mention I am on the latest windows 8 preview release. Not sure if that matters. I have tried running as administrator but still have the same problems with the left mouse button.

  • Members
  • 8 posts
  • Last active: Sep 14 2012 09:35 AM
  • Joined: 14 Sep 2012
I noticed if I remap a keyboard button to a mouse click it spams automatically without using time delay code. :)
It seams simple so maybe it's commonly known. I don't know if there are people who never bothered to try it.

with this one while F1 is held left click is spammed.
F3::Click Right

with this code right click spam occurs while Num Pad #3 is pressed.
NumPad3::Click Right

  • Members
  • 719 posts
  • Last active: Nov 11 2014 07:12 PM
  • Joined: 30 Aug 2012
I feel the need to tell you that this is:

1) The thread I find myself referring people to most frequently.
2) The thread I find myself referencing the most when I need useful ways to activate the rest of my code.
3) Most helpful [email protected] [email protected]

Thank you.

  • Members
  • 5 posts
  • Last active: May 04 2012 05:13 AM
  • Joined: 04 May 2012
This might seem silly to some but I'm unable to figure out how to add a image on top of my game when my toggle is running and to not show when it isn't.
#IfWinActive Guild Wars 2
toggle = 0
#MaxThreadsPerHotkey 2

    Toggle := !Toggle
     While Toggle{
        Send 2
		Send 4
		Send 5
		Send 9
		Send {F2}
        sleep 100
Very simple script. I've tried several different things with gui, add, picture but the closest I've gotten to it working was a white square in the center of my screen and the computer spazing out and having to end task the script. Any help would be appreciated. Thank you in advance!

  • Moderators
  • 8510 posts
  • Last active: Sep 10 2015 05:50 AM
  • Joined: 08 Apr 2009
You want your script to display an image, you even tried it yourself.
But you post a script without image code.

It would have been better to post your code so we could tell you where the problem was :(

At the top of your script, add whatever gui command you need and add the image
do not 'show' the gui.

Immediately after Toggle := !Toggle insert this code
if toggle
  gui, show
  gui, hide

  • Members
  • 1 posts
  • Last active: Nov 06 2012 02:00 AM
  • Joined: 06 Nov 2012
Hi, i was looking for an autofire/rapidfire script these days in order to play some console games that requires a lots of spamming (sidescrollers mainly), but I cant manage to find a "good to go" script. I see a lot of "mouse1" autofire scripts around, but I cant manage to edit it in order to make it work with a keyboard key. It must have to do with the "click" and the "P" command inside these scripts, I dont know what to do with them, what to use to replace than, etc. Can anyone to help me with that? I guess its really easy to write such script to the people that are used to the program once the "mouse1" one is so simple.


  • Members
  • 37 posts
  • Last active: May 31 2014 02:49 AM
  • Joined: 30 Sep 2012
You'd be looking at the last ready-to-go script which holds down a key to spam. The BBCode inside the code tags is annoying and may be causing issues, but given you've removed them, it should work.
	While GetKeyState("F8","P"){
		Sleep 50 ;  milliseconds
That's your hold F8 script, and all you need to do is replace F8 with whatever key you need.
For example, swapping the F8 out for spacebar:
	While GetKeyState("Space","P"){
		Sleep 50 ;  milliseconds

  • Members
  • 6 posts
  • Last active: Nov 21 2012 03:58 AM
  • Joined: 17 Nov 2012
hello! Posted Image
i randomly just discovered this while searching google for a rapid-fire hotkey, and think this might be what i'm looking for.
my confusion is your descriptions of what each script does.

simply what i want to do is when i press and hold the arrow keys i want them to rapid fire roughly about 1-2 times a second.
i'm familiar with c++ to a degree so i'm confident in my ability to edit the coding to what i need with a bit of practice, mostly just looking for a starting point

nvm think i figure out some of it

  • Members
  • 3 posts
  • Last active: Nov 27 2012 08:41 AM
  • Joined: 18 Oct 2011
Need some help.
Diablo 1 accepts

#MaxThreadsPerHotkey 1

SendMode Input

While GetKeyState("LButton", "P")
Sleep, 80

While GetKeyState("LButton", "P")
Sleep, 80
for everything besides attacking... (it clikcs inventory button so fast that it just flashes by for example)
Why is this?

  • Members
  • 4 posts
  • Last active: Dec 18 2012 07:07 AM
  • Joined: 03 Sep 2010

I am somewhat of an idiot when it comes to this stuff and just need a scipt that sends the input of Ctrl X over and over again. If anyone could help me with this it would be much appreciated.

  • Members
  • 3 posts
  • Last active: Jan 21 2014 02:38 PM
  • Joined: 02 Jan 2013

I am using the key press starts auto repeat, 2nd key press stops auto repeat script, with some modifications that are irrelevant to the question.  The question/problem is when i switch to a different window, like an open notes file, while it is auto repeating, the characters go to the file.  This is of course because the send is to the active window.  Is there any way to either force the send to the correct window, or to stop the send when the window is not active?

  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010

Please don't ask for help in this topic; use the help forums instead.