PennController for IBEX › Forums › Support › Using if statements during a trial › Reply To: Using if statements during a trial
June 25, 2020 at 8:15 am
#5716
mschrumpf
Participant
Hello everybody,
I am currently working on a very similar experiment: a self-paced reading task where some but not all of the items have a comprehension question.
I tried to apply your code from earlier in this thread, Jeremy, as stated below. My implementation has completely taken out the skript however, as I now only get the “There must be some items in the running order” error message when I try to run it.
This is my code:
Template( "MyTable.csv" ,
row => newTrial( "experiment" ,
dashed("sentence", row.Satz)
,
newButton("Fertig")
.print()
.wait()
,
newTimer(200)
.start()
.wait()
,
newText("Frage", row.Frage)
,
newText("Links", row.Links)
,
newText("Rechts", row.Rechts)
,
newCanvas("Canvas", 450,200)
,
newSelector("Selector")
,
newTimer("200", 200)
.start()
.wait()
,
( row.Antwort=="1" ? [
getText("Frage")
.print(),
getText("Links")
.print(),
getText("Rechts", row.Rechts)
.print(),
getCanvas("Canvas")
.add( 0 , 0 , getText("Links") )
.add( 250 , 0 , getText("Rechts") )
.print(),
getSelector("Selector")
.add ( getText("Links"), getText("Rechts"))
.keys( "F" , "J")
.log()
.once()
.wait()
] : [
getText("Frage")
.print() //Placeholder code. The final skript should just "do nothing" here
] )
)
.log("Item" , row.Item )
.log( "Konsistent" , row.Konsistent )
.log( "Geschlecht" , row.Geschlecht )
.log( "Krit" , row.Krit )
.log( "Anzahl" , row.Anzahl )
.log( "Antwort" , row.Antwort )
.log( "Satz" , row.Satz )
.log( "Frage" , row.Frage )
.log( "Links" , row.Links )
.log( "Rechts" , row.Rechts )
)
Since the error message is giving me nothing to work with, I would be very grateful for any hints as where I have gone wrong.
Thanks in advance and best regards