So I have this script (thanks is due to whoever):


   if toggle

When holding Ctrl, it prevents the scripts from working. How do I make it so that only one press of Ctrl is required to prevent the other scripts from working? Then when pressed again the scripts start working again.


This will let you press Ctrl once to toggle, and left-click will rapid-repeat whatever command you insert in Line 6.


    if toggle  ; Only run if toggle is on
        while, getKeyState("lButton")  ; Repeat if left-click is held
            ; Insert left-click function here

You can prevent other hotkeys from working by including the if toggle condition in their definitions:

    if toggle  ; Only run if toggle is on
        msgBox Toggle is on, you pressed A.
    else  ; Do nothing if toggle is off
        send a

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.