Good day! I'm having a hard time with the script I made. What I want to happen is to spam buttons in a certain sequence with a 1 second delay in between each key. For example, the moment I press the F5 key, it will start a sequence that goes like "2 then 1 second delay, 3 then 1 second delay, 5 then one second delay, 4 then one second delay, 3 then one second delay'" and then it will start the sequence again after it hits the last key. However, instead of going "2-3-5-4-3" (the '-' representing the 1 second delay), the script I made goes like "2-3-5-4" and then it loops. My problem is that the last key shouldn't be 4 but 3, so how do I add 3 in the last part of the sequence?
The following is the script I made using Notepad:
Code: Select all
F5::
Send2active := !Send2active
If Send2active
SetTimer Send2, 1000
Else
SetTimer Send2, Off
Return
Send3active := !Send3active
If Send3active
SetTimer Send3, 1000
Else
SetTimer Send3, Off
Return
Send5active := !Send5active
If Send5active
SetTimer Send5, 1000
Else
SetTimer Send5, Off
Return
Send4active := !Send4active
If Send4active
SetTimer Send4, 1000
Else
SetTimer Send4, Off
Return
Send3active := !Send3active
If Send3active
SetTimer Send3, 1000
Else
SetTimer Send3, Off
Return
Send2: ;spams key 2
Send, 2
Send3: ;spams key 3
Send, 3
Send5: ;spams key 5
Send, 5
Send4: ;spams key 4
Send, 4
Return
[Mod edit: [code][/code] tags added.]