response timeout

PennController for IBEX Forums Support response timeout

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9885
    marijesoto
    Participant

    Dear Jeremy,

    I am aware that there are several posts on the forum about this topic, but nonetheless I was not able to fix my problem.

    In this specific section of the experiment, I want participants to use the mouseclick to select one of three presented words, and if they don´t respond within, let´s say, 5 seconds, then automatically the options (3 words) whould dissapear, and the button (“passar”) should appear for them to click to go to the next trial.
    When I tried the callback funtion with a timer function on the selector, it almost worked, but then he did not show the little purple frame around the selected word anymore 🙁
    Could you help me out?
    Thanks so much.
    demonstration link: https://farm.pcibex.net/r/GQYMWn/

    Stretch of script:

    Template("Bloco1B.csv", variable =>
        newTrial("Bloco1",
        newText("pal1",variable.pal1),
        newText("pal2",variable.pal2),
        newText("pal3",variable.pal3)
        ,
       newCanvas("canvas12",1000,130)
            .add(325,50,getText("pal1"))
            .add(450,50,getText("pal2"))
            .add(575,50,getText("pal3"))
            .css("font-size","1.3em")
            .print(),
            
            newSelector("pal_sel")
            .add(getText("pal1"), getText("pal2"), getText("pal3"))
            .frame("dashed 3px violet").log().wait()
            ,
        newTimer(200).start().wait(),
        getCanvas("canvas12").remove(),
        
        newButton("passar","Clique PARA VER a próxima tela.")
        .center()
        .css("font-size","0.8em")
        .print("center at 51vw","middle at 20vh")
        .wait(),////////////
    
        //getText("perg").remove(),
        //getText("perg2").remove(),
        getButton("passar").remove()
    
    
    )
        .log("Group", variable.Group)
        .log("item", variable.item)
        .log("pal1", variable.pal1)
        .log("pal2", variable.pal2)
        .log("pal3", variable.pal3)
        .log("letras",variable.letra)
        .log("tiporel", variable.tiporel) 
        .log("pos_alvo", variable.pos_alvo) 
    )
    #9894
    Jeremy
    Keymaster

    Hi,

    As long as you keep the 200ms timer before removing the Canvas, you should see the frame for 0.2s:

    newTimer("timeout", 5000)
    ,
    newSelector("pal_sel")
        .add(getText("pal1"), getText("pal2"), getText("pal3"))
        .frame("dashed 3px violet")
        .log()
        .callback( getTimer("timeout").stop() )
    ,
    getTimer("timeout").start().wait()
    ,
    newTimer(200).start().wait()
    ,
    getCanvas("canvas12").remove(),

    Jeremy

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