Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to loop a certain script using user input with INPUTBOX?

The script below runs only once when I click the button for it. Is there any way for the script to popup something where it asks for a number for it to loop? Lets say something pops up and i give in "10". Then the script is executed 10 times.

myscript:

sleep 100
InputBox, testvariable, Enter your Input here,,,350, 120
send 100
send {Tab}
sleep 100
send %testvarable%
return
share|improve this question

1 Answer 1

Just use another InputBox and a Loop:

InputBox, ite, "Repeat...", "How many times to loop?"
Loop %ite% {
  sleep 100
  InputBox, testvariable, Enter your Input here,,,350, 120
  send 100
  send {Tab}
  sleep 100
  send %testvarable%
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.