Pausing experiment

PennController for IBEX Forums Support Pausing experiment

This topic contains 1 reply, has 2 voices, and was last updated by Jeremy Jeremy 4 days ago.

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

    Hi Jeremy,

    We would like to incorporate a feature into our experiment where participants, either by clicking a constantly on-screen button or by pressing a certain key, can pause the experiment. However, we’d like it to finish the trial it’s on first, and then not move on to the next until the key/button is clicked/pressed again.

    Sorry if this was already answered elsewhere – I couldn’t find a similar question. Thanks as always!




    Hi Nikhil,

    “Finish the trial” can mean vastly different things depending on your task and your desiderata. You’ll need to make decisions as to what, precisely, should happen with each element in your task when the button is clicked. A very radical and easy-to-implement option is to just drop everything altogether, all you need to do is print a button whose callback will call end:

    newButton("Stop").callback( end() ).print()

    You can use as many commands as you want in the callback, so if you need to do anything with your existing elements (eg. stop some audio playback) before ending the trial, just do it there too

    Let me know if you have questions as you implement your own solution


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.