Pausing loop to wait for input (click event)

I'm trying to get a number of user inputs from an edit box.
I'd like to have the user press a button when input is complete.  I tried
putting the call to get the input in a loop but I can't get the execution to
wait for user input (and button click) before executing the next loop
iteration.  How do I pause the loop execution to wait for a button click?
Sounds simple enough but I can't get it to work.

Thanks in advance for your help.