-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmousetrap_response.osexp
198 lines (181 loc) · 6.18 KB
/
mousetrap_response.osexp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
---
API: 2.1
OpenSesame: 3.3.14
Platform: nt
---
set width 1024
set uniform_coordinates yes
set title example_experiment
set synth_backend legacy
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 sampler_backend legacy
set round_decimals 2
set mouse_backend legacy
set keyboard_backend legacy
set height 768
set fullscreen no
set form_clicks no
set foreground black
set font_underline no
set font_size 18
set font_italic no
set font_family sans
set font_bold no
set experiment_path "C:\\Users\\Pascal\\Documents\\GitHub\\mousetrap-os\\examples"
set disable_garbage_collection yes
set description "Default description"
set coordinates relative
set compensation 0
set color_backend legacy
set clock_backend legacy
set canvas_backend legacy
set bidi no
set background white
define notepad description
__note__
This is an example experiment that demonstrates how the
mousetrap_response item can be used for implementing
mouse-tracking in OpenSesame.
The study is based on experiment 1 from
Dale, R., Kehoe, C., & Spivey, M. J. (2007).
Graded motor responses in the time course of
categorizing atypical exemplars.
Memory & Cognition, 35(1), 15-28.
Please note that the material is different from the original
study and that the task procedure has been simplified.
__end__
set description "A simple notepad to document your experiment. This plug-in does nothing."
define sequence experiment
set flush_keyboard yes
set description "Runs a number of items in sequence"
run description always
run instructions always
run stimuli always
run feedback always
define feedback feedback
set reset_variables yes
set duration keypress
set description "Provides feedback to the participant"
draw textline center=1 color=black font_bold=no font_family=sans font_italic=no font_size=18 html=yes show_if=always text="Thank you!<br /><br />You have completed all trials.<br /><br />You have provided the correct answer in [accuracy] % of the trials.<br /><br />(Press any key to exit)" x=0 y=0 z_index=0
define mousetrap_response get_response
__warning_message__
draw textline text="Please start moving" x=0 y=0
__end__
set update_feedback yes
set timeout infinite
set start_coordinates "0;280"
set skip_item no
set sketchpad present_stimulus
set save_trajectories yes
set reset_mouse yes
set number_of_buttons 2
set mouse_buttons_allowed "left_button;right_button"
set max_initiation_time 1000
set logging_resolution 10
set description "Tracks mouse movements"
set correct_button "[CategoryCorrect]"
set click_required yes
set check_initiation_time no
set button4 ""
set button3 ""
set button2 "[CategoryRight]"
set button1 "[CategoryLeft]"
set boundaries "upper=no lower=no left=no right=no"
define form_text_display instructions
set timeout infinite
set spacing 10
set rows "1;4;1"
set only_render no
set ok_text OK
set margins "50;50;50;50"
set form_title "<span size=24>Welcome</span>"
__form_text__
In the following, you will be presented with a number of different animals.
Your task is to judge to which of two categories each animal belongs.
The name of the animal that we would ask you to categorize will be shown in the bottom center of the display.
Two buttons representing the categories will be located in the top left and right corners.
Please indicate your answer by clicking on the corresponding button.
You will start each trial manually by clicking on a start button.
__end__
set description "A simple text display form"
set cols "1;1;1"
set _theme gray
widget 0 0 3 1 label text="[form_title]"
widget 0 1 3 1 label center=no text="[form_text]"
widget 1 2 1 1 button text="[ok_text]"
define logger logger
set description "Logs experimental data"
set auto_log yes
define sketchpad present_stimulus
set duration 0
set description "Displays stimuli"
draw rect color=black fill=0 h=128 name="[CategoryLeft]" penwidth=1 show_if=always w=192 x=-512 y=-384 z_index=0
draw rect color=black fill=0 h=128 name="[CategoryRight]" penwidth=1 show_if=always w=-192 x=512 y=-384 z_index=0
draw textline center=1 color=black font_bold=no font_family=sans font_italic=no font_size=18 html=yes show_if=always text="[CategoryLeft]" x=-416 y=-320 z_index=0
draw textline center=1 color=black font_bold=no font_family=sans font_italic=no font_size=18 html=yes show_if=always text="[CategoryRight]" x=416 y=-320 z_index=0
draw textline center=1 color=black font_bold=no font_family=sans font_italic=no font_size=18 html=yes show_if=always text="[Exemplar]" x=0 y=248 z_index=0
define form_text_display start_button
set timeout infinite
set spacing 10
set rows "1;4;1"
set only_render no
set ok_text Start
set margins "50;50;50;50"
set form_title "<span size=24>New trial</span>"
__form_text__
Click on "Start" to start the next trial.
__end__
set description "A simple text display form"
set cols "1;1;1"
set _theme gray
widget 0 0 3 1 label text="[form_title]"
widget 0 1 3 1 label center=no text="[form_text]"
widget 1 2 1 1 button text="[ok_text]"
define loop stimuli
set source_file ""
set source table
set skip 0
set repeat 1
set order random
set offset no
set item trial
set description "Repeatedly runs another item"
set cycles 4
set continuous no
set column_order "Condition;CategoryLeft;CategoryRight;CategoryCorrect;Exemplar"
set break_if_on_first yes
set break_if never
setcycle 0 Exemplar Monkey
setcycle 0 CategoryLeft mammal
setcycle 0 CategoryRight fish
setcycle 0 CategoryCorrect mammal
setcycle 0 Condition Typical
setcycle 1 Exemplar Tortoise
setcycle 1 CategoryLeft bird
setcycle 1 CategoryRight reptile
setcycle 1 CategoryCorrect reptile
setcycle 1 Condition Typical
setcycle 2 Exemplar Ostrich
setcycle 2 CategoryLeft bird
setcycle 2 CategoryRight mammal
setcycle 2 CategoryCorrect bird
setcycle 2 Condition Atypical
setcycle 3 Exemplar Dolphin
setcycle 3 CategoryLeft fish
setcycle 3 CategoryRight mammal
setcycle 3 CategoryCorrect mammal
setcycle 3 Condition Atypical
run trial
define sequence trial
set flush_keyboard yes
set description "Runs a number of items in sequence"
run start_button always
run present_stimulus always
run get_response always
run logger always