Reply To: Choosing subet of items to present

PennController for IBEX Forums Support Choosing subet of items to present Reply To: Choosing subet of items to present

#6806
apspj
Participant

I was not sure either. Getting into this world of programming now…

So this is what I am trying but it does not seem to work (I put 1 item of each just to test):

//Experiment
conditions = [
    pick(randomize(startsWith("A")), 1),
    pick(randomize(startsWith("B")), 1),
    pick(randomize(startsWith("C")), 1),
    pick(randomize(startsWith("D")), 1),
    pick(randomize(startsWith("E")), 1),
    pick(randomize(startsWith("F")), 1),
    pick(randomize(startsWith("G")), 1),
    pick(randomize(startsWith("H")), 1)
]
.sort( ()=>Math.random()-0.5)

fillers = randomize(startsWith("dist"))

Sequence( 
    conditions[0], pick(dist, 1),
    conditions[1], pick(fillers, 1),
    conditions[2], pick(fillers, 1),
    conditions[3], pick(fillers, 1),
    conditions[4], pick(fillers, 1),
    conditions[5], pick(fillers, 1),
    conditions[6], pick(fillers, 1),
    conditions[7], pick(fillers,1)
)
Template("myTable.csv",
    row => newTrial("experiment", row.cond + "-" + row.item,
        newController("DashedSentence", {s: row.sentence}
            .css("font-size", "20px")
            .css("font-family", "Calibri")
            .center()
            .print()
            .print()
            .log()
            .wait()
            .remove()
    )
  )
)