Jump to content
Sign in to follow this  
xtrykr

Rapid fire toggle?

Recommended Posts

xtrykr

Is there an example script that allows me to set a key to a macro that rapidfires a certain key, and then if i press that key again, it turns the rapidfire off? Thanks!

Share this post


Link to post
Share on other sites
JFee

Not that I know of... you're gonna have to do some coding yourself. OH NO! ;)

Here are some things to look up

Do...until loops

TimerInit and TimerDiff (to detect a double tap to start the "rapid fire")

Send


Regards,Josh

Share this post


Link to post
Share on other sites
rasim

xtrykr

Don`t completely understand what is a rapid fire, this?

#include <Misc.au3>

$hDll = DllOpen("user32.dll")

MsgBox(0, "Info", 'Press "A" key for rapid fire')

While 1
    If _IsPressed("41", $hDll) Then
        Do
            Send("a")
            Sleep(100)
        Until _IsPressed("41", $hDll) = 1
    EndIf
    Sleep(100)
WEnd

Func OnAutoItExit()
    DllClose($hDll)
EndFunc

;)

Edited by rasim

Share this post


Link to post
Share on other sites
dgarrett8

While 1
    If _IsPressed("41", $hDll) Then
        Do
            Send("a")
            Sleep(100)
        Until _IsPressed("41", $hDll) = 1
    EndIf
    Sleep(100)
WEnd

I have a simple question. What does the "41" represent?

Edited by dgarrett8

"I think, therefore I am"[size="1"]René Descartes[/size]

Share this post


Link to post
Share on other sites
BrettF
dgarrett8

I see now, it represents the hex. I looked under FAQ before i posted here and I was confused. So no need to get " ;) "

But thank you for helping me understand better.

Edited by dgarrett8

"I think, therefore I am"[size="1"]René Descartes[/size]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.