Reply To: Logging order of elements

PennController for IBEX Forums Support Logging order of elements Reply To: Logging order of elements

#5108
Jeremy
Keymaster

Hi,

There is no simple built-in command or option for that at the moment, so you have to check the order yourself:

newTrial(
    newButton("option1", variable.answer1)
    ,
    newButton("option2", variable.answer2)
    ,
    getCanvas("canvas", 500,100)
        .settings.remove(getText("listen"))
        .settings.add(150, 180, getButton("option1"))
        .settings.add(350, 180, getButton("option2"))
        .print()
    ,
    newVar("leftbutton").global().set("option1"),
    newVar("right").global().set("option2")
    ,
    newSelector()
        .settings.add(getButton("option1"), getButton("option2"))
        .shuffle()
        .settings.log()
        .wait()
        .test.index(getButton("option1"),0)
        .failure(
            getVar("leftbutton").set("option2"),
            getVar("right").set("option1")
        )
)
.log("leftbutton", getVar("leftbutton"))
.log("rightbutton", getVar("rightbutton"))

Jeremy