Logging order of elements

PennController for IBEX Forums Support Logging order of elements

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5105
    mg5171
    Participant

    Hi,
    I’m presenting an audio file, followed by option1 and option2; I’ve shuffled the order of these so that option1 doesn’t always appear first. I’ve managed to log the options themselves, but do you have suggestions of how to log the order in which they were presented? In other words, in addition to the text corresponding to the buttons, I want to log which button appeared on the right and which on the left.

    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()
        ,
        newSelector()
            .settings.add(getButton("option1"), getButton("option2"))
            .shuffle()
            .settings.log()
            .wait()
    

    Thanks!

    • This topic was modified 3 years, 12 months ago by mg5171.
    #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

    #5111
    mg5171
    Participant

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.