Try this
I’ve removed the code with rewind and made edits to the interrupt code and the repeats. You might need to reattach the spreadsheet.
exp_Con1_V.2.psyexp (60.0 KB)
Try this
I’ve removed the code with rewind and made edits to the interrupt code and the repeats. You might need to reattach the spreadsheet.
exp_Con1_V.2.psyexp (60.0 KB)
Thank you so much. I am deeply grateful for your help. It works perfectly fine, as I expected. If you don’t mind. May I include your name in my acknowledgment? I couldn’t done this without you.
I’m glad that’s working for you now. Acknowledgments are always welcome (as a psychology demonstrator I am often in the position of supporting rather than authoring projects). My name is Wakefield Morys-Carter.
Sorry for bothering you again, I was too excited that I forgot the condition (2) that I still working on.
In condition (2), participants are allowed to decide if they want to do an interruption task at the moment or not. I have created a routine to ask participants if they want to do an interruption task at the moment or not: If they press ‘y’, they will go to an interruption task. If they press ‘n’, they will skip the interruption task, and an interruption task that was skipped will move to the end of the trials. The problem is I have no idea how to move the interruption task to the end of the trials. Do you have any advice?
If you have a routine after the trial routine and before the interruption with a keyboard component called task_resp then you could put the following in End Routine
if task_resp.keys == 'y' and repeats.thisN == 0:
repeats.finished = False
skipInterrupt = False
Thank you for your advice. I tried your code and added some code for the custom key response. Now, I can go to the interruption task and skip the interruption task with the ‘y’ and ‘n’ keys, but when it returns to the main task, the interruption task will pop up again. I wonder if there is something wrong with my code.
exp_con2.psyexp (67.4 KB)
I have fixed it as you recommend, but the problem remains the same.
Please upload the latest psyexp file.
Is this the issue?
On trial x the question shows
If y show the interruption
The same trial shows again?
The question shows again?
The interruption shows again?
Yes, you understand correctly (I apologize for not being clear). On trial 3/4/7, when participants press ‘y’, the interruption will occur. After participants have done the interruption, they will return to the main task where they left off. The problem is when they return to the main task where they left off, the question shouldn’t show up again, but it still shows up. This problem happened the same when participants pressed ‘n’.
This is my latest psyexp files. Thank you for your consideration
exp_con2.psyexp (74.1 KB)
Thank you for your advice. The problem has been solved now. There is one thing that I want to do, but I still have no idea how to do it. The idea is if participants press ‘n’, they will skip the interruption task, and an interruption task that was skipped will move to the very end. Is there any way to do it?
Might you want more than one interruption task at the end?
I want an interruption task to show up at the end. The number of interruption tasks that occur at the end will based on the number of times the participant pressed ‘n’.
In that case I would recommend the method I use for my Repeat Subset or Randomisation without repetition online demo. Have an extra loop at the end which just presents interruption tasks from a list.
I appreciate your help. I tried your method (mostly from Repeat Subset), but it doesn’t work. The interruption task doesn’t repeat at the end. I might have done something wrong. Any help is greatly appreciated
exp_con2.psyexp (119.3 KB)
$repeatRows should be in selected rows, not random seed.
I would recommend using a relative path for the conditions file.
It will look something like this, am I right?
It still doesn’t repeat the task, but I found an interesting result. After the experiment, the running view displayed a number like [0, 2, 3]. I guess it’s the number of tasks that must be repeated. I hope this information may be useful.
Sorry for bothering you (a lot). I have tried to solve the problem myself, but it remains the same. The runner view shows the number of tasks that must be repeated, but the tasks do not repeat. This is my latest experiment file. Thank you for any help.
exp_con2.psyexp (120.6 KB)
main_conditions.xlsx (14.1 KB)
Hi @wakecarter
This is the latest update of the code that I have tried to use lately. I use these, but the issues persist (the experiment ends with no repeat). I wonder if there might be something wrong with my code. I think this might be my last problem - any guidance would be greatly appreciated.
Interrupt Routine (Begin experiment)
repeatRows = []
Interrupt Routine (End routine)
if trials.thisN in [2, 3, 6] and task_resp.keys == 'n':
repeatRows.append(trials.thisIndex)
The loop