PennController for IBEX › Forums › Support › html layout/event times/selector vs. scale/ compatibility › Reply To: html layout/event times/selector vs. scale/ compatibility
Hi,
I’m not sure I’m following everything, but and
does not mean “and do something else,” it is used to write a conjunctive test: reference
The commands success
and failure
accept subsequences of commands, separated by commas just like the main sequence of commands, eg:
.test.selected({ V: getImage("inappropriate"), B: getImage("infelicitous"), N: getImage("appropriate") }[variable.Right_Key]) .success( getVar("exp_score").set(s_exp=>s_exp+1) , getVar("item_score").set(sc_i=>sc_i+1) )
And yes, it is possible to have multiple test
commands on the same element:
.test.selected({ V: getImage("inappropriate"), B: getImage("infelicitous"), N: getImage("appropriate") }[variable.Right_Key]) .success( getVar("exp_score").set(s_exp=>s_exp+1) , getVar("item_score").set(sc_i=>sc_i+1) ) .test.selected(getImage("inappropriate")).success( getVar("v_score").set( v=> v+1 ) ) .test.selected(getImage("infelicitous")).success( getVar("b_score").set( v=> v+1 ) ) .test.selected(getImage("appropriate")).success( getVar("n_score").set( v=> v+1 ) )
Note that in this example I assume you have created the Var elements named v_score, b_score and n_score earlier
Feel free to share a link to your experiment with me if you’d like more assistance, so I can see the code as is, in context
Jeremy