Wait {delay}|{text}|{b$(),a|a$}

If no parameter is specified, this command pauses program execution and waits for the user to press a key or the (Continue) button.

If a delay is specified (in milliseconds) the program pauses for that amount of time. No pause message will be displayed.

If a string parameter is specified, then that text is displayed on the button.

For Example:

Wait "Accept"

Wait can also be used to display a group of buttons.

For Example:

Dim Buttons$(2) = "One", "Two", "Three"
Wait Buttons$(),a$
If a$ = Buttons$(0) Then 100
If a$ = Buttons$(1) Then 200
If a$ = Buttons$(2) Then 300

In this case the text of the button is returned since a$ is a string variable.

If the return variable is numeric, the button index is returned.

For Example:

Dim Buttons$(2) = "One", "Two", "Three"
Wait Buttons$(),n
On n + 1 Goto 100,200,300

Up to ten buttons may be displayed at once. But with ten buttons on the screen at one time, button text will have to be one character long.

Pausing the program is handy. It can give the screen time to update and the user time to read some text.

If you keep getting a Force Close message during long loops, try inserting a

Wait 1

in the loop. Or better yet, use the Progress command.

Become a Patron