Self Paced Reading Timed Reminder

PennController for IBEX Forums Support Self Paced Reading Timed Reminder

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7535
    AlexCrnx
    Participant

    With a DashedSentence controller is there any way to display a new text element after a certain period of inactivity to remind participants that they need to press the space bar in order move to the next window?

    #7537
    Jeremy
    Keymaster

    Hi,

    Yes, you can use a Key element and its callback command to (re)start a Timer element whenever the space bar is pressed, and display the message after that timer has elapsed:

    newController("DashedSentence", {s: "Hello world, bye Earth"}).print()
    ,
    newText("reminder", "<em>Press Space to see the next word</em>").center().print()
    ,
    newTimer("reminder timer",2000)
    ,
    newKey(" ")
      .callback(
        getTimer("reminder timer").stop(),
        getText("reminder").hidden(),
        getTimer("reminder timer").start().wait(),
        getText("reminder").visible()
      )
    ,
    getController("DashedSentence").wait().remove()
    ,
    getText("reminder").remove()
    ,
    newButton("Continue")
      .print()
      .wait()

    Jeremy

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