PennController for IBEX › Forums › Support › Proceeding to the next trial based on different conditions › Reply To: Proceeding to the next trial based on different conditions

Hi Jeremy!
I have a similar problem to supadhye’s.
I have a completion experiment and I want to impose two limits on the completions:
– I want participants to complete two or more words, not only one (this I have already done)
– and I want a time limit. So, for example, if a participant is more than one minute in the experiment, I want it to automatically pass on to the next trial and an error message that says: “Too slow”.
So far I have this, but it is not working: the timer doesn’t stop the trial and the error message doesn’t appear. Do you have any suggestions?
// Practica 1
newTrial("p1",
newText("Complete con lo primero que venga a su mente, recuerde que tiene que ser más de una palabra:</p></p>")
.center()
.color("blue")
.print()
,
newTextInput("rta_p1")
.css("font-size", "14px")
.center()
.before(newText("La señora empujó al padre del niño que "))
.log()
.lines(0)
.size(250, 22)
.print()
,
newTimer("hurry", 1000)
.start()
,
getTimer("hurry")
.test.ended()
.success(newText("lento", "¡Muy lento!").print(), getTextInput("rta_p1"))
,
newButton("prox", "Próxima")
.css("font-size", "medium")
.css("margin","1em")
.color("blue")
.center()
.print()
.wait(getTextInput("rta_p1").test.text(/^\s*\S+(?:\s+\S+)+\s*$/)
.failure(newText("Es necesario completar el recuadro con más de una palabra para pasar a la próxima oración").center().color("red").print()))
)
Also here’s the demonstration link: https://farm.pcibex.net/r/ooxFkv/
Thanks a lot!
Noelia.