PennController for IBEX › Forums › Support › Trial templates & tables › Reply To: Trial templates & tables
You can turn off the debugger using PennController.DebufOff() in your script (e.g. place it at the very top or at the very bottom). I would recommend keeping it on until you’re ready to publish your experiment though, as it can provide you with very useful messages in case of errors.
It is possible to code a timeout, but it’s not entirely straightforward as it means that the trial has two possible outcomes when, usually, the single outcome is “selection happens.” What you can do is launch a 4s timer and wait for it to end, and tell your slider to end your timer early when selection happens.
Now, I just realized that PennController 1.3 introduced a bug with timer.stop so we’ll need a little trick: we’ll create a button that we never print, and we’ll wait for a click on it and make both the slider and the timer click it:
newButton("validate", "") , newScale("akzeptabilität", 7) .settings.before( newText("left1", "1
(am unakzeptabelsten)") ) .settings.after( newText("right2", "7
(am akzeptabelsten)") ) .settings.slider() .settings.callback( getButton("validate").click() ) // will click the button when the slider is moved .print() .settings.log() , newTimer(4000) .settings.callback( getButton("validate").click() ) // will click the button when the timer ends .start() , getButton("validate") .wait()