I'm fairly new to Python and PsychoPy, and I'm quite dependable on this forum which is so helpful. So thank you!
But now I'm stuck: I couldn't find a way to display an interactive dialogue box after participant performs a block (loop) of trials to ask them to enter sentences of worlds or/and numbers that must be then saved for later analysis. This is the code I have so far after a loop:
Begin Experiment:
from psychopy import gui
Begin Routine:
# Present dialogue box
background = visual.Window(fullscr=False, color =[0,0,], size=[5000, 5000], allowGUI=False) # optional: a temporary big window to hide the desktop/app to the participant
background.show()
myDlg = gui.Dlg(title="Yor description of the task")
myDlg.addField('Blue Deck: What percentage of times you get response A:')
myDlg.addField(' you get response B:')
myDlg.addField('Red Deck: What percentage of times you get response A:')
myDlg.addField(' you get response B:')
myDlg.show()
event.waitKeys()
ok_data = myDlg.show() # show dialog and wait for OK or Cancel
if myDlg.OK: # or if ok_data is not None
print(ok_data)
else:
print('User cancelled')
I have found some bits of code in this thread Why does my dialogue box not show when fullscr=True?, but can't get my head around it to make work for me.
I would really appreciate any help. Thanks!