Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .