Trouble with Timer – not stopping and not letting me press a key

PennController for IBEX Forums Support Trouble with Timer – not stopping and not letting me press a key

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #10663

    Hello (again),

    My name is Lorrainy, and I’m doing a self paced reading task, where the segments are presented one by one without any clue, and I need to add a timer of 6 seconds maximum for the comprehension question. I did the same as the orientation given in answer #9776, however I don’t think it worked?

    When I put the timer and it gets to the question, it just stops there, doesn’t go on when pressing the keys (A or L) neither does it pass when it reaches the 6 seconds. Without the timer the experiment was running ok…

    I’ll also need to put a 3 seconds maximum for each segment, and it should stop when pressing space. Think it’ll be the same as the 6s one, if not, how could I do it?

    Here’s what I’ve done and it’s not working for me:

    newTimer ("TempoR", 6000)
        newText("Pergunta", row.PERGUNTA)
        newScale ("Pergunta",2)
            .after (newText(row.R2))
            .print("center at 50vw", "middle at 70vh") 
            .callback(getTimer ("TempoR") .stop())

    Here’s the demo link as well:
    The trial/Template in question is the one named “Pratica”

    Thank you


    Hello Lorrainy,

    Your script works as expected: when it reaches the .wait() line on the Key element, it stays there until the A or L key is pressed. Once either key is pressed, it moves on to the next line, which is the callback line, and on to the next lines until it reaches the .wait() line on the Timer element, and stays there until the timer ends

    So only after an initial key press on A or L will further key presses on A or L stop the timer. If you never press A or L, the script will remain on the Key element’s wait line forever. If you press A or L once, it will stay on the Timer element’s wait line until the 6 seconds have passed. If you press A or L a second time within 6s, then the timer will end early and so will the trial

    If I understand you correctly, you simply want to take out the .wait() line on the Key element


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