Click down
SLeep 20 //you should use random sleep here also.
Click up
What kind of programming language is that?
Anyway, I would do it like this: before starting the script you should make a variable like:
int n = Random(18, 25);
And also make a counter before while.
q::
t:=!t
//int n = Random(18, 25);
//int counter = 0;
While (t){
Click down
SLeep 20
Click up
Random, rand, 80, 450
Sleep % rand
}
return
Then at the end of your while you should count clicks and check if clicks is equal to n:
q::
t:=!t
//int n = Random(18, 25);
//int counter = 0;
While (t){
Click down
SLeep 20
Click up
Random, rand, 80, 450
Sleep % rand
//counter = counter + 1;
//if(counter == n){
// //Press ESC button here
// Sleep(Random(1221, 5959)); //sleep here
// counter = 0; //reset counter
// n = Random(18, 25); //generate new random value
// //Press ESC button here
//}
}
return
I hope you know Java/C# basics. I don't know what kind of language is that so I wrote the code in Java(let's say)... Anyway, you know now how your code should work.