a wait will not move on to the next line of code until the time is up (i.e. 10s in this case)
I think what you are after is to couch your loop inside a repeat-until or while-endwhile loop and use a counter to count down the time, and include a keypress event that will give you the same effect (not a very good explanation so I will try and show you)
the code below illustrates both types of loop. They are almost the same in that they each use the endloop variable to trigger the end of loop, and they both use either key press (up/down arrow respectively) or a timer (I used 5 seconds
) to trigger the variable change
`initialise variables at the start of the loop
timestamp=timer()
endloop = 0
`start while/endwhile loop
while endloop = 0
timenow=timer()
text 10,10,"Loop #1"
text 10,20,"Wait 5 seconds or press up arrow to exit loop"
if upkey()=1 then endloop = 1
if (timenow - timestamp) > 5000 then endloop = 1
ENDWHILE
`reinitialise variables and screen for second loop
cls
timestamp = timer()
endloop = 0
`commence repeat/until loop
repeat
timenow=timer()
text 10,10,"Loop #2"
text 10,20,"Wait 5 seconds or press down arrow to exit program"
if downkey()=1 then endloop = 1
if (timenow - timestamp) > 5000 then endloop = 1
until endloop = 1
end
This is not the Sig you are looking for....