Control Q advancing modules instead of quit


Author
Message
YCANLab
YCANLab
Respected Member (437 reputation)Respected Member (437 reputation)Respected Member (437 reputation)Respected Member (437 reputation)Respected Member (437 reputation)Respected Member (437 reputation)Respected Member (437 reputation)Respected Member (437 reputation)Respected Member (437 reputation)
Group: Forum Members
Posts: 5, Visits: 19
Hello,

We notice that when we test our script, we can advance through the modules without completing them if we press Control Q. Interestingly, pressing control Q does not quit out of the experiment, as we would expect (unless it's the last module), but instead as I said advances to the next module. 

Would participants also be able to advance this way? If so it throws the integrity of our experiment off. Is there a way to make sure Control Q quits out of the whole experiment, instead of advancing? I should mention that the modules are built up of multiple scripts that are called from a parent script. 

Any guidance would be much appreciated. Thank you!
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: 98K
YCANLab - Wednesday, October 24, 2018
Hello,

We notice that when we test our script, we can advance through the modules without completing them if we press Control Q. Interestingly, pressing control Q does not quit out of the experiment, as we would expect (unless it's the last module), but instead as I said advances to the next module. 

Would participants also be able to advance this way? If so it throws the integrity of our experiment off. Is there a way to make sure Control Q quits out of the whole experiment, instead of advancing? I should mention that the modules are built up of multiple scripts that are called from a parent script. 

Any guidance would be much appreciated. Thank you!

CTRL+Q terminates the currently running *script*, if your experiment is made up of multiple scripts run via <batch>, then pressing CTRL+Q will end the current script N and the batch will then move on to the next script N+1. If you want to have the entire <batch> terminate, you need to add some additional logic to call the script.abort() function, which can terminate an entire batch optionally. Suppose you have two scripts A and B, then you would do something like this:

a.iqx:
<expt a>
/ ontrialend = [
if (expt.a.response == "Ctrl+'Q'") script.abort(true);
]
/ blocks = [1=myblock]
</expt>

<block myblock>
/ trials = [1-10=mytrial]
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
/ posttrialpause = 500
</trial>

<text mytext>
/ items = ("Press SPACE")
</text>

b.iqx:
<expt b>
/ ontrialend = [
if (expt.b.response == "Ctrl+'Q'") script.abort(true);
]
/ blocks = [1=myblock]
</expt>

<block myblock>
/ trials = [1-10=mytrial]
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (28)
/ posttrialpause = 500
</trial>

<text mytext>
/ items = ("Press ENTER")
</text>

batch.iqx
<batch>
/ file = "a.iqx"
/ file = "b.iqx"
</batch>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search