DMDX Help.
Again When Keyword
<AgainWhen N1,N2>
<animate N1,N2>
<aw N1,N2>
<an N1,N2>
A switch alternative. After the frame is displayed it is rescheduled again N1 times N2 ticks in the future. All frames in the sequence are adjusted to be identical in size (as all DMTG frames were) so that any frame overwrites any other frame.
The last frame of an animate series of items really should be a blank frame as item_read() will be clearing the screen (along with all the back buffers) a few ticks after the display sequence finishes as a part of the extended treatment needed for animated items on account of drawimage() no longer being able to predict what back buffer contains what after an animate sequence.
Typical usage of this keyword where we want to alternate and A B sequence
12 times at a 3 Hz rate might be:
+1 *
/ <aw 12, 20> "A" %10 / <aw 12, 20> "B" %10 / ;
Note we're not putting the clock on in a frame that will not be displayed again.
And if you wanted that display sequence to stop after a subject responds you
could use the abort item expression and
abort display queue purge to do so (we turn
feedback off because <adqp> usually
clobbers it):
0 "adqp" <aie jobstatus
.eq. 7> <adqp> <nfb>;
+1 *
/ <aw 12, 20> "A" %10 / <aw 12, 20> "B" %10 / ;
DMDX Index.