Loop a certain action, and before every loop, to add 1 to a variable.
At the end of the loop, it checks if the variable is at the multiples of 10 (10,20,30,40 etc.), and if it is, to throw a Gui asking if the user wants to continue.
And if the user clicks Continue, the script goes on until it hits another multiple of 10.
So far, this is what I have:
Code: Select all
#CommentFlag //
Loop
{
shitvar += 1
Sleep, 1000 //Not the action I actually want to do, but eh.
If shitvar = 10
{
Gui, destroy
Gui, Add, Text, x10 y5, You've been useless for %shitvar% times.
Gui, Add, Text, x10 y20, Do you want to continue?
Gui, Add, Button, x10 y50, Stop
Gui, Add, Button, x50 y50, Continue
}
}
Is there a way to compress the IF statement?