Reply To: Multiple Mouse Clicks

PennController for IBEX Forums Support Multiple Mouse Clicks Reply To: Multiple Mouse Clicks

#5286
Jeremy
Keymaster

Hello Farzaneh,

What exactly do you mean by “multiple clicks on the same stimuli”? What should happen if your participant clicks on the exact same element again?

As far as I can tell, there is nothing wrong with your script: it will wait for a click on one of the images before moving on from your last wait command, but your participant should still be able to modify their choice (ie. keep clicking on the images) until the end of the trial (that is, unless your script explicitly does something against that). You just need to add "all" in your log command to have all the clicks reported in the results file. Here is a version of your script edited for concision, where I added a “Finish” button to demonstrate that you can modify your choice at will before clicking the button:

newTrial(
    defaultImage
        .size(200, 180)
        .css("border", "solid 1px black")
    ,
    newTimer("show", 1000),
    newTimer("between", 900)
    ,
    newCanvas("base",1000,410).print()
    ,
    newImage("one", "Blue.png").print( 370 , 180 , getCanvas("base") ),
    getTimer("show").start().wait(),
    getImage("one").remove(),
    getTimer("between").start().wait()
    ,
    newImage("two", "Green.png").print( 370 , 180 , getCanvas("base") ),
    getTimer("show").start().wait(),
    getImage("two").remove(),
    getTimer("between").start().wait()
    ,
    newImage("three", "Yellow.png").print( 370 , 180 , getCanvas("base") ),
    getTimer("show").start().wait(),
    getImage("three").remove(),
    getTimer("between").start().wait()
    ,
    newImage("four", "Red.png").print( 370 , 180 , getCanvas("base") ),
    getTimer("show").start().wait(),
    getImage("four").remove(),
    getTimer("between").start().wait()
    ,
    getCanvas("base")
        .add( 240 , 0 , getImage("one") )
        .add( 560 , 0 , getImage("two") )
        .add( 240 , 230 , getImage("three") )
        .add( 560 , 230 , getImage("four") )
    ,
    newSelector()
        .add( getImage("one") , getImage("two") , getImage("three") , getImage("four") )
        .log("all")
    ,
    newButton("Finish").center().print().wait()
)

Jeremy