How to code a pause button?


Author
Message
clb357
clb357
Partner Member (974 reputation)Partner Member (974 reputation)Partner Member (974 reputation)Partner Member (974 reputation)Partner Member (974 reputation)Partner Member (974 reputation)Partner Member (974 reputation)Partner Member (974 reputation)Partner Member (974 reputation)
Group: Forum Members
Posts: 5, Visits: 21
Hello!

I'm running a study using several Inquisit tasks (Mr. Peanut, Tower of London, ANT) on 7 year old children. As one might expect, when working with children it would be advantageous to be able to pause a task. However, as I understand there is no button that automatically pauses the experiment? If that is correct, is there a simple addition to the experimental code that will add a button (such as esc or backspace) that when pressed will pause the experiment -- which at that point you could choose to quit or continue?

Any help would be appreciated -- thanks!
Charlotte


Tags
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 97K
> However, as I understand there is no button that automatically pauses the experiment?

Correct.

> [...] is there a simple addition to the experimental code that will add a button (such as esc or backspace) that when pressed will pause > the experiment -- which at that point you could choose to quit or continue?

You would have to integrate the "pause" response into the overall code, i.e., add it as a valid response in all the <trial> elements, and then for example /branch to a dedicated "pause" <trial>. This is not necessarily simple. See e.g. https://www.millisecond.com/forums/Topic7654.aspx for a very basic example.

However, you would likely not need "pause" functionality for some procedures. For example, you could just leave the TOL sitting in right where it is when the participant needs a break. S/he can pick up right where s/he left off after the break. Also note that any script can be terminated using the built-in CTRL+Q key combination.

Hope this helps.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 97K
Come to think of it, you could "abuse" the built-in debug window as a way to effectively pause a script. Press CTRL+D during script execution to bring the window up (it displays the current state of the script's various properties, values, expressions, etc.), and the script will halt at that point. The script will move on from that point once you close the window. While not necessarily pretty-looking, this would not require any modifications / additional coding in any of the scripts.

(I should add, however, that CTRL+D will only work in Inquisit Lab, not Inquisit Web.)

Edited 8 Years Ago by Dave
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search