2

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
2

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%
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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