--- API: 2 OpenSesame: 3.1.9b1 Platform: posix --- set width 1024 set uniform_coordinates yes set title "New experiment" set subject_parity even set subject_nr 0 set start experiment set sound_sample_size -16 set sound_freq 48000 set sound_channels 2 set sound_buf_size 1024 set round_decimals 2 set height 768 set fullscreen no set form_clicks no set foreground white set font_underline no set font_size 18 set font_italic no set font_family mono set font_bold no set disable_garbage_collection yes set description "The main experiment item" set coordinates uniform set compensation 0 set canvas_backend xpyriment set bidi no set background black define sequence experiment set flush_keyboard yes set description "Runs a number of items in sequence" run new_loop always define form_text_input new_form_text_input set timeout infinite set spacing 10 set rows "1;1;6" set only_render no set margins "50;50;50;50" set form_var color set form_title Title set form_question "Type a color" set description "A simple text input form" set cols 1 set _theme gray widget 0 0 1 1 label text="[form_title]" widget 0 1 1 1 label center=no text="[form_question]" widget 0 2 1 1 text_input focus=yes return_accepts=yes stub="" var="[form_var]" define inline_script new_inline_script set description "Executes Python code" ___run__ import random cv_correct = canvas() cv_wrong = canvas() cv_correct.text('correct') cv_wrong.text('wrong') words = ['red','green','blue','yellow','black'] random.shuffle(words) if var.color == words[0]: # check whether input word corresponds to first word in list cv_correct.show() else: cv_wrong.show() clock.sleep(1000) __end__ set _prepare "" define loop new_loop set source table set repeat 6 set order random set description "Repeatedly runs another item" set cycles 1 set continuous no set break_if_on_first yes set break_if never setcycle 0 empty_column "" run new_sequence_1 define sequence new_sequence_1 set flush_keyboard yes set description "Runs a number of items in sequence" run new_form_text_input always run new_inline_script always