Hi all. I need some help getting my program to wait a certain amount of time, allowing input from the user during that time, and then respond to the input. For example, I want the user to do math problems for 30 seconds, and after they submit their response for each math problem, I want a dialog box to tell them whether their response is correct. The problem is, when I use the "answer" command, it cancels the wait period and automatically moves on in the program. To illustrate what I want, here is some of my code:
Code: Select all
go to card "MathTest"
wait 30 seconds with messages
go to card "EndTest"
Then, in the card which I have called "MathTest," there are some math problems, with answer fields. Here is the script associated with one of those fields:
Code: Select all
on returninfield
put field "ans1" of card "math" into tans
if tans = (142) then
answer "Correct!"
else
answer "That is incorrect. Please try harder next time."
end if
end returninfield
No matter how much time has passed, as soon as they click "Ok" in the Answer dialog box it moves on to the card "EndTest." Is there some option for using an Answer dialog box without canceling out the Wait command?