I’m sure this is a relatively trivial question but I cannot seem to work out how to get an experiment to cancel once the GUI has been loaded. Please see below on how I am using the GUI.
OKGO = 0 while OKGO == 0: dictDlg = gui.DlgFromDict(dictionary=info, title='memory - on going', fixed=['ExpVersion']) if len(info['Participant']) == 0: print "did not enter participant number" win32api.MessageBox(0,'You did not enter the participant number','Error') else: OKGO = 1 if dictDlg.OK: print(info) else: print('User Cancelled')
If the user presses cancel or x it says ‘you did not enter the participant number’ and will not let the user leave until they have entered a participant number and started the experiment. Any help is appreciated