Tap fire

Ask gaming related questions
ulle73
Posts: 7
Joined: 08 Feb 2018, 20:13

Tap fire

08 Feb 2018, 21:06

New to This

But Would like to code a script for tap shooting

I Want the code to leftclick once every 0,5 sec When holding in xbutton2. When i release xbutton2 i Want it to stop clicking.
User avatar
eventhorizon
Posts: 158
Joined: 27 Oct 2016, 14:22

Re: Tap fire

08 Feb 2018, 22:03

If you are going to build a routine like this you will need to be familiar with the following autohotkey commands...

click or send
sleep
getkeystate
if
return
loop or while
break

see also the "Hotkey" entry in the help file for how to set up a hotkey to do this and the keylist entry in the help file for the proper names for the keys
A computer lets you make more mistakes faster than any invention in human history – with the possible exceptions of handguns and tequila.
ulle73
Posts: 7
Joined: 08 Feb 2018, 20:13

Re: Tap fire

09 Feb 2018, 06:04

Did try. But didnt work :headwall: Could you or someone try to code it for me? Would really be apprciated! :bravo:
User avatar
eventhorizon
Posts: 158
Joined: 27 Oct 2016, 14:22

Re: Tap fire

09 Feb 2018, 08:13

you said...
I Want the code to leftclick once every 0,5 sec When holding in xbutton2. When i release xbutton2 i Want it to stop clicking.

Code: [Select all] [Download] GeSHi © Codebox Plus

xbutton2:: ;<- this is the hotkey 
while (getkeystate("xbutton2","p")) ;<- this tests to see if the hotkey is pressed
{ click, left ;<- if it is click the left mouse button
sleep 500 ; and sleep 1/2 second
} ;<- then keep looping til the button is released
return ;<- finally go back to waiting for the key again.

I have not tested this code so be warned.
A computer lets you make more mistakes faster than any invention in human history – with the possible exceptions of handguns and tequila.
ulle73
Posts: 7
Joined: 08 Feb 2018, 20:13

Re: Tap fire

09 Feb 2018, 09:04

works exectly like i want it!! thanks!!

although, it clicks kind of randomly, dont keep the same rate all the time

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 4 guests