PDA

View Full Version : User input



green12
09-16-2009, 02:23 PM
Is there a way to have to have a loop pause and wait for the user to make a choice using gui buttons, save a certain variable and then continue the loop?

Thanks

rwagner
09-16-2009, 08:27 PM
I would do something like this (conceptually... not PV-WAVE code. Let me know if you need a better wave example.):

button_callback:
common c, v
v = True

main:
common c, v
outer loop:
v = False
while v == False:
wtprocessevent, /drain
;you may need to put two of these calls in this loop
end while
do_whatever()
end outer loop

green12
09-21-2009, 03:37 PM
this was very helpful thank you.