Reply To: How to go automatically from one iamge to next within a row or from one row to

PennController for IBEX Forums Support How to go automatically from one iamge to next within a row or from one row to Reply To: How to go automatically from one iamge to next within a row or from one row to

#8374
Jeremy
Keymaster

Hi,

Do you mean that each picture should be displayed for 400ms before automatically disappearing, and being replaced with the next picture? What about the middle one, with audio playback: should it also remain on the screen for just 400ms regardless of audio playback, or should it remain on the screen for the whole duration of the audio?

In any case, as long as you have wait on a Key element, the script will not move on to the next lines until the participant presses a key. If instead of waiting for a keypress, you want to wait for some time to elapse, then you need to wait for a Timer element instead. For example, you could replace the line newKey("space", " ").wait(), with newTimer("displayTime", 400).start().wait(), and the first image would remain on the page for 400ms before being removed (because the next command, getImage("image1").remove(), will only be executed once the wait command on the Timer element has been completed)

Note that if you remove the line newKey("space", " ").wait(), then you no longer create a Key element named “space” in your trial, and therefore any future reference to it (getKey("space")) will consequently result in a reference error (but I presume that you would replace all those Key references anyway, if you want everything to move on automatically rather than upon keypress)

Jeremy