0

I'm a gamer and mainly play Roblox, I need to set up a script that will open the chatbox by pressing the slash key and then it will say explode all and then the enter key. I've already managed to come up with a script, I also read that you will need to have a delay between each keystroke for it to register for some reason, I can't seem to figure out how to do that. Any guidance will be appreciated highly. Here's the script I've made so far

working = 0

F12::
If (working = 0) {
   working = 1
   SetTimer, SendString, 30
} else {
   working = 0
   SetTimer, SendString, Off
}   
return

SendString:
Send, /
Sleep, 10  ; 10 milliseconds
Send, unchar all{Enter}
Return
0

As far as I am aware, many games may need extended time between keystrokes. 10 milliseconds may simply not be enough. You may wish to try increasing this to 20 milliseconds minimum.

Regarding options for sending individual key strokes with delays, try replacing ex.:

SendString:
Send, /
Sleep, 10  ; 10 milliseconds
Send, unchar all{Enter}
Return

with:

SendString:
Send, /
Sleep, 20  ; 20 milliseconds
Send, u
Sleep, 20  ; 20 milliseconds
Send, n
Sleep, 20  ; 20 milliseconds
Send, c
Sleep, 20  ; 20 milliseconds
Send, h
Sleep, 20  ; 20 milliseconds
Send, a
Sleep, 20  ; 20 milliseconds
Send, r
Sleep, 20  ; 20 milliseconds
Send, {Space} 
Sleep, 20  ; 20 milliseconds
Send, a
Sleep, 20  ; 20 milliseconds
Send, l
Sleep, 20  ; 20 milliseconds
Send, l
Sleep, 20  ; 20 milliseconds
Send, {Enter}
Sleep, 20  ; 20 milliseconds
Return
| improve this answer | |

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.