Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- API: 2
- OpenSesame: 3.1.0a34
- Platform: posix
- ---
- set width 1024
- set uniform_coordinates yes
- set title "Extended template"
- set subject_parity even
- set subject_nr 0
- set start experiment
- set height 768
- set foreground white
- set font_size 18
- set font_italic no
- set font_family mono
- set font_bold no
- set experiment_path "/home/lotje/.local/share/opensesame_resources/templates"
- set description "A template containing a practice and an experimental phase"
- set coordinates uniform
- set compensation 0
- set canvas_backend xpyriment
- set bidi yes
- set background black
- define notepad about_this_template
- __note__
- This template already contains the basic structure of a typical experiment.
- It consists of a practice phase, followed by an experimental phase. For more
- information, please visit <http://osdoc.cogsci.nl/>
- Have fun with OpenSesame!
- __end__
- set description "Some pointers to help you gest started!"
- define loop block_loop
- set source table
- set skip 0
- set repeat 5
- set order random
- set offset no
- set item trial_sequence
- set description "A single block of trials"
- set cycles 1
- set continuous no
- set column_order ""
- set break_if_on_first yes
- set break_if never
- setcycle 0 empty_column ""
- run trial_sequence
- define sequence block_sequence
- set flush_keyboard yes
- set description "A sequence containing a single block of trials followed by feedback to the participant"
- run reset_feedback always
- run block_loop always
- run feedback always
- define sketchpad end_of_experiment
- set start_response_interval no
- set duration keypress
- set description "A sketchpad notifying the participant that the experiment is finished"
- draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text="Press any key to exit" x=0 y=0 z_index=0
- define sequence experiment
- set flush_keyboard yes
- set description "The main sequence of the experiment"
- run about_this_template always
- run experimental_loop always
- run end_of_experiment always
- define loop experimental_loop
- set source_file ""
- set source table
- set skip 0
- set repeat 1
- set order random
- set offset no
- set item block_sequence
- set description "A loop containing one or more experimental blocks"
- set cycles 1
- set continuous no
- set column_order practice
- set break_if_on_first yes
- set break_if never
- setcycle 0 practice no
- run block_sequence
- define feedback feedback
- set reset_variables yes
- set duration keypress
- set description "Provides feedback to the participant"
- draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text="Your average response time was [avg_rt]ms<br /><br />Your accuracy was [acc]%<br /><br />Press any key to continue" x=0 y=0 z_index=0
- define form_multiple_choice form_multiple_choice
- set timeout infinite
- set spacing 10
- set question "What is your favorite animal?"
- __options__
- A dog
- A bunny
- Other
- __end__
- set margins "50;50;50;50"
- set form_var response
- set form_title question
- set description "A simple multiple choice item"
- set button_text Ok
- set allow_multiple yes
- set advance_immediately yes
- set _theme gray
- define logger logger
- set description "Logs experimental data"
- set auto_log yes
- define inline_script new_inline_script
- set description "Executes Python code"
- set _run ""
- ___prepare__
- while True:
- items.prepare("form_multiple_choice")
- items.run("form_multiple_choice")
- if var.response != "no":
- break
- __end__
- define reset_feedback reset_feedback
- set description "Resets the feedback variables, such as 'avg_rt' and 'acc'"
- define sequence trial_sequence
- set flush_keyboard yes
- set description "A single trial"
- run form_multiple_choice never
- run new_inline_script always
- run logger always
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement