DMDX Help.


Abort Item Key Name Keyword

<AbortItemKeyName text>
<aikn
text>

variant:
Abort Item Expression Keyword (see below)

<AbortItemExpression expression>
<aie expression>


    Parameter and switch to specify the Abort Item key name.  By default no key is specified and so items cannot be aborted. Once a valid key available on the current input devices (see Input) is selected as the abort item key name, pressing that key will attempt to abort that item and continue on to the next one -- any pending request will still have to be issued however if you aren't using continuous running.  As of version 5 the time relative to the clock on will be included in whatever output file is being generated if that item had a clock on in it (ie generated output in the first place).  Note that if you just want the next frame to display the <expireif> keyword added in version 6.1.2.0 of DMDX is a better choice than the abort keywords.

   Note that there was a bug with <aie> operating on video when using the Direct3D renderer (ie under Windows 8 and later) and seeing as DMDX was not being actively developed at the time it wasn't addressed for quite some time and therefore the Direct3D renderer may have had to be turned off under those circumstances with TimeDX's File / Change Renderer command (this of course has it's own costs such as dropped frames).  This appears to be rectified as of version 5.1.4.2, sure better be anyway, had to resort to no less than three work arounds to get around VMR9's behavior...

    Not all things can be aborted as the display queue will still have to execute unless <AbortDQPurge> is used, logic to dump pending frames is fraught with peril so the ability to do it is exposed with extreme caution. What will be aborted however are any
Digital Video and sound files (both normal wave files and streaming audio files) that are still being played, they will be stopped instead.   Also any RecordVocal recording will be stopped.  Any pending subject response timeout will also expire. This means that the following items will not abort until the last blank frame is displayed:

0 <dv> "filename" / ;
+100 "target" * / ;

    The following items however will abort because there will be nothing left in the display queue:
   

0 <dv> "filename" ;
+100 "target" * ;

    The abort key name cannot be unmapped with the mapping keywords as it's not a mapped key, instead you can specify no key name with <aikn>.

    Note that binding the same key to both the request and to the abort key will likely lead to unexpected behavior that aborts the following item unintentionally.


Abort Item Expression variant:

    Parameter and switch to specify the Abort Item expression.  For more discussion on the uses of <AbortItemExpression> see the Abort Display Queue section in the built in introduction.

    Once the display queue is empty (see above) the abort item expression is evaluated repeatedly, if it yields a true (non-zero) result the item is aborted as outlined above.  If <AbortDQpurge> is active the expression is checked continuously as it can cause yet to be displayed frames to be discarded.  The expression syntax can be found in the <SetCounter> keyword documentation.  The expression variant is principally provided for use in conjunction with the <LookingTime> keyword to allow a video sequence to be aborted if a subject looses interest and to facilitate this counter values set by looking times will be updated any time a keystroke is stored by the zillion response code.  Typical use to abort a trial after a baby has been looking away (where the experimenter is pressing the A key when the baby's attention is being held) for more than two seconds would be:
   

<zil> <lt 1,-a> <aie c1 .gt. 2000>
+1
00 * <dv> "filename" ;

    Additional functionality for <aie> comes with the jobstatus token in the expression parser.  It has one of eleven values and does not necessarily go from one to the other in simple ascending sequence:

1 available
2 ready to read item-file
3 waiting for request
4 request received - schedule item
5 item is being displayed
6 waiting for a response
7 response received
8 naming task negation
9 providing feedback
10 last frame displayed
11 job terminated

    However you can tell if a response has been made so if you want a video to play until a response is made the following code is useful:

<ep> <vm desktop>  <id "keyboard">
    <aie jobstatus .eq. 7>  </ep>
0 "test aie jobstatus";
+1 * <dv> "movie.mpg";
+2 * <dv> "movie.mpg";
+3 * <dv> "movie.mpg";

    That code will play the video till either the response has been made or it times out (so at most 4 seconds of that video will be played).



DMDX Index.