Sign in to follow this  
Followers 0
xtrykr

Rapid fire toggle?

6 posts in this topic

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



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

#3 ·  Posted (edited)

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

#4 ·  Posted (edited)

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

#6 ·  Posted (edited)

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  
Followers 0