---
API: 2
OpenSesame: 3.1.6
Platform: nt
---
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 experiment_path "c:\\Users\\subject22\\Documents\\VU\\OPENSESAME_PROJECTS\\opensesame_3.1.6-py2.7-win32-1\\opensesame_3.1.6-py2.7-win32-1\\lib\\site-packages\\share\\opensesame_resources\\templates"
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 sketchpad complete
set duration keypress
set description "Displays stimuli"
draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text="form is complete
" x=-32 y=0 z_index=0
define sequence experiment
set flush_keyboard yes
set description "Runs a number of items in sequence"
run getting_started always
run welcome always
run new_loop always
define inline_script form
set description "Executes Python code"
___run__
from libopensesame import widgets
form = widgets.form(self.experiment, cols=[1]*4, rows=[1]*5, spacing = 10)
instruct = widgets.label(form, text='choose 2 items, and continue')
nextButton = widgets.button(form, text='continue')
option1= widgets.checkbox(form, text = labels[0], var = var_labels[0])
option1= widgets.checkbox(form, text = labels[1], var = var_labels[1])
option2= widgets.checkbox(form, text = labels[2], var = var_labels[2])
option3= widgets.checkbox(form, text = labels[3], var = var_labels[3])
option4= widgets.checkbox(form, text = labels[4], var = var_labels[4])
option5= widgets.checkbox(form, text = labels[5], var = var_labels[5])
option6= widgets.checkbox(form, text = labels[6], var = var_labels[6])
option7= widgets.checkbox(form, text = labels[7], var = var_labels[7])
option8= widgets.checkbox(form, text = labels[8], var = var_labels[8])
#first column:
form.set_widget(option1, (0,0))
form.set_widget(option2, (0,1))
form.set_widget(option3, (0,2))
form.set_widget(option4, (0,3))
#second column:
form.set_widget(option5, (1,0))
form.set_widget(option6, (1,1))
form.set_widget(option7, (1,2))
form.set_widget(option8, (1,3))
#fourth column:
form.set_widget(instruct, (3,0))
form.set_widget(nextButton, (3,3), colspan=2)
form._exec()
__end__
___prepare__
labels = []
var_labels = []
for i in range(10):
labels.append('option: %s' %i)
var_labels.append('answer_%s' %i)
__end__
define notepad getting_started
__note__
Welcome to OpenSesame 3.1 "Jazzy James"!
If you are new to OpenSesame, it is a good idea to follow one of the tutorials,
which can be found on the documentation site:
-
You can also check out the examples. These can be opened via:
- Menu -> Tools -> Example experiments.
And feel free to ask for help on the forum:
-
Have fun with OpenSesame!
__end__
set description "A simple notepad to document your experiment. This plug-in does nothing."
define inline_script new_inline_script_1
set description "Executes Python code"
___run__
check_length = 2
nr_ans = 0
while True:
exp.items["form"].run()
for i in range(9):
if self.get('answer_%s' %i) != 'no':
nr_ans += 1
#check the number of answers:
if nr_ans == check_length:
break
else:
exp.items["warning"].prepare()
exp.items["warning"].run()
__end__
set _prepare ""
define loop new_loop
set source_file ""
set source table
set repeat 1
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
define sequence new_sequence
set flush_keyboard yes
set description "Runs a number of items in sequence"
run form never
run warning never
run new_inline_script_1 always
run complete always
run option1 "[answer_1] != no"
run option2 "[answer_2] != no"
define sketchpad option1
set duration keypress
set description "Displays stimuli"
draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text="option1_sketchpad_to inpsect
-- press any key to continue --" x=0 y=0 z_index=0
define sketchpad option2
set duration keypress
set description "Displays stimuli"
draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text=option2 x=0 y=0 z_index=0
define sketchpad warning
set duration 1000
set description "Displays stimuli"
draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text="incomplete fill out 2 options" x=0 y=0 z_index=0
draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text="-- any key to continue -- " x=0 y=160 z_index=0
define sketchpad welcome
set start_response_interval no
set reset_variables no
set duration keypress
set description "Displays stimuli"
draw textline center=1 color=white font_bold=no font_family=serif font_italic=no font_size=32 html=yes show_if=always text="OpenSesame 3.1 Jazzy James" x=0 y=0 z_index=0