PennController for IBEX › Forums › Support › Response time limit › Reply To: Response time limit
November 30, 2020 at 11:57 pm
#6414
rosa303
Participant
Hi Jeremy,
Thank you for the help on the conditional feedback message. It works!
Regarding the timeout keypress problem, I tried disabling the response keys as you suggested (with a simpler version of my script, below) but I still get the same problem. If I wait and not press anything before the warning message and then press spacebar after the warning message, the next screen is just a white screen. It works fine (moves on to the next trial) if I press a response key before the warning message, within the 2000ms. I only use the spacebar key at the end of each trial.
Template( "AA2_items_target_practice.csv",
row =>
newTrial( "target" ,
//fixation
newText("dot", ".")
.print()
.cssContainer({"font-size": "200%", "color": "white"})
,
newText("fixation", "+")
.print()
.settings.center()
.cssContainer({"font-size": "220%"})
,
newTimer("wait", 1000)
.start()
.wait()
,
getText("dot")
.remove()
,
getText("fixation")
.remove()
,
//RSVP preamble
newController("DashedSentence", {s: row.preamble, mode: "speeded acceptability", display: "in place"})
.print()
.cssContainer({"font-size": "180%", })
.log()
.wait()
.remove()
,
getText("dot")
.print()
,
newText("targetword", row.word)
.print()
.settings.center()
.cssContainer({"font-size": "180%", "color": "green"})
,
newText("choice", "<p><strong>F</strong> ...................... <strong>J</strong></p>")
.print()
.settings.center()
.cssContainer("font-size" , "140%")
,
newText("choice2", "Good ................................ Bad")
.print()
.settings.center()
.cssContainer("font-size" , "120%")
,
//response
newTimer("time limit", 2000)
.log()
.start()
,
newKey("response", "FJ")
.log("first")
.callback( getTimer("time limit").stop() )
,
getTimer("time limit")
.wait()
,
getKey("response")
.test.pressed()
.success( getKey("response").test.pressed(row.answer)
.failure(newText("negative feedback", "Wrong answer!")
.log()
.print()
.center()
.cssContainer({"font-size": "160%", "color": "red"})
)
)
.failure(newText("slow", "Too slow...")
.log()
.print()
.center()
.cssContainer({"font-size": "160%", "color": "red"})
)
,
newText("press spacebar" , "<p>Press <strong>SPACEBAR</strong></p>")
.print()
.settings.center()
.cssContainer({"font-size": "120%"})
,
getKey("response")
.disable()
,
newKey("spacebar" , " ")
.wait()
)
.log( "Condition" , row.condition )
.log( "Item" , row.item )
.log( "Targetword" , row.word )
.log( "CorrAns" , row.answer )
)
SendResults()
Best,
Rosa.