Ok, basically I've been entering specific keystrokes using:
EVENT Type=KEYPRESS CHAR=X
Where "X" is the actual keystroke. Now, I need to have the code replace "X" randomly from a list of 10 different keys.
I read a couple other threads that offer some insight, someone asked how to enter random text and got a piece of code that seems promising:
SET !VAR1 EVAL("var letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','w','x','y','z']; var string = ''; for(var i = 0; i < 10; i++){string += letters[parseInt(Math.random() * 25)]}; string")
Assuming I only need 10 specific letters, and I need it to be only ONE keystroke entered at a time, how should I edit this SET variable?
I assume the EVENT code would end up looking like this (please correct me if I'm wrong):
EVENT Type=KEYPRESS CHAR=
Aucun commentaire:
Enregistrer un commentaire