Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

The definitive autofire thread!


  • Please log in to reply
130 replies to this topic
LazyMan
  • Members
  • 587 posts
  • Last active: Oct 21 2014 05:13 PM
  • Joined: 17 Feb 2011
I suspect:

SendPlay {Click 200}
is as fast as we'll get, but maybe someone else will point out something faster.

flak
  • Members
  • 283 posts
  • Last active: Jan 01 2012 06:20 PM
  • Joined: 02 Oct 2009
F12::
   StartTime := A_TickCount
   Loop 200
  {
    DllCall("mouse_event", "uint", 2, "int", 0, "int", 0)
    DllCall("mouse_event", "uint", 4, "int", 0, "int", 0)
  }
   ElapsedTime := A_TickCount - StartTime
   MsgBox %ElapsedTime%
Return
Try this.

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

SendPlay {Click 200}
and

Loop 200
{
    DllCall("mouse_event", "uint", 2, "int", 0, "int", 0)
    DllCall("mouse_event", "uint", 4, "int", 0, "int", 0)
}
are so fast I wonder if Polarbear's game can keep up with them. :twisted:

Polarbear
  • Members
  • 5 posts
  • Last active: May 17 2011 08:37 PM
  • Joined: 15 May 2011
Thanks guys :D Also just realised if you spam it in p2p games it makes everyone's game freeze lol.

x79animal
  • Members
  • 1021 posts
  • Last active: May 14 2013 04:21 PM
  • Joined: 01 May 2010
Bump

resueman
  • Members
  • 2 posts
  • Last active: Jun 16 2011 02:37 PM
  • Joined: 16 Jun 2011
Hello.

I'm using this:

#SingleInstance
#MaxThreadsPerHotkey 1

SendMode Input
`::Suspend
~$LButton::
	While GetKeyState("LButton", "P")
	{
		Click
		Sleep, 80
	}
return

If I click LMB while holding down ctrl, alt or shift, it only sends a mousedown event, then hangs. It works fine otherwise. How do I fix it?

EDIT:
I figured that ctrl+click is different than normal click and made another shortcut for ^LButton. It works but it's kind of ugly. Any other ideas?

EDIT2:
I'm using version 1.0.48.03.

EDIT3:
#SingleInstance
#MaxThreadsPerHotkey 1

SendMode Input
`::Suspend


~$LButton::
	While GetKeyState("LButton", "P")
	{
		Click
		Sleep, 80
	}
return

~$^LButton::
	While GetKeyState("LButton", "P")
	{
		Click
		Sleep, 80
	}
return
I can now crouch (holding ctrl) and start autofiring. Maybe the bug is only for my version.

nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010
I cannot reproduce the bug. holding control while clicking works normally for me while running that script.

Edit: you changed some stuff.
Have a look at the * modifier on the hotkeys page.

resueman
  • Members
  • 2 posts
  • Last active: Jun 16 2011 02:37 PM
  • Joined: 16 Jun 2011

I cannot reproduce the bug. holding control while clicking works normally for me while running that script.

Edit: you changed some stuff.
Have a look at the * modifier on the hotkeys page.

Cheers, exactly what I needed. I made the shortcut ~$*LButton:: and it works perfectly now. Another issue I have is that GetKeyState doesn't seem to work all the time, i.e. I keep autofiring even if I don't have the button pressed, thus wasting ammo. It does stop with the next physical click though... Hm.

nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010
Sounds like the game's fault... :?:

Tes
  • Members
  • 3 posts
  • Last active: Jul 19 2011 12:44 PM
  • Joined: 13 Sep 2008
Hello, thanks for this guide. It was very helpful for me, since I am complete AHK noob.
I have little annoying problem with "the self sender" macro.
So I have this simple script which I use while playing RIFT so my fingers will not drop dead when I turn 40. When I hold and keep Spacebar or F key pressed, this script emulates like I press and release those keys very fast, in other words autofire mode. The problem is, that sometimes those keys getting stuck in autofire mode even after I release those buttons. I need to press and release stuck key to stop autofiring. This happens not very often and so it's hard to reproduce. Sorry for my English, not my first language.
Here is the script which I use:
#NoEnv
#UseHook
SetTitleMatchMode, 3
#IfWinActive, RIFT

SendMode Input

ctrl & Shift::Return

LWin::Return

Space::
While GetKeyState("Space","p"){
  Send {Space down}
  Sleep 100
  Send {Space up}
  Sleep 100
 }
return

f::
While GetKeyState("f","p"){
  Send {f down}
  Sleep 100
  Send {f up}
  Sleep 100
 }
return


Gabry
  • Guests
  • Last active:
  • Joined: --
Hi,

I read all 3 pages of this post but i can't make this work yet

I would like to press down one time my MButton and make that in games it was like i keep pressing down it....
Then when i repress the MButton make that in game i stop pressing down it

Thanks a lot to all help me!

tomoe_uehara
  • Members
  • 2166 posts
  • Last active: Jun 11 2015 05:33 PM
  • Joined: 05 Sep 2009
All you need is "The Toggle"

The Toggle: (Press once to start, again to stop, etc like the simple pause)
Code:

toggle = 0 
#MaxThreadsPerHotkey 2 

F8:: 
    Toggle := !Toggle 
     While Toggle{ 
        Click 
        Send a 
        sleep 100 
    } 
return



Gabry
  • Guests
  • Last active:
  • Joined: --
Ok, thanks a lot!

Last question..

I would to make one click of my Right mouse button doing an instant double click of MButton

How can i do that?

thank again....

Frankie
  • Members
  • 2930 posts
  • Last active: Feb 05 2015 02:49 PM
  • Joined: 02 Nov 2008
loop 2

   Click Middle

aboutscriptappsscripts
Request Video Tutorials Here or View Current Tutorials on YouTube
Any code ⇈ above ⇈ requires AutoHotkey_L to run

Gabry
  • Guests
  • Last active:
  • Joined: --
I expressed myself wrong

I would keep pressing Right Mouse Button and i would that script keep pressing "W" and click 2 times fast the Middle mouse button

Can you write the entire script please?
I'm a noob in scripting and i would be very grateful.


Thanks!