-
Notifications
You must be signed in to change notification settings - Fork 1
/
op2.zp
132 lines (105 loc) · 2.64 KB
/
op2.zp
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
/******************************************************************************\
FILE: reading.zp
AUTHOR: Theo Veenker <[email protected]>
ADAPTED BY: -
DESCRIPTION:
Implementation of task: Text Reading
For more information on the reading task see readme.txt in the
test folder.
Global structure of experiment:
- welcome
- phase 1 (see subfolder test)
- thankyou
HISTORY:
2013-07-03 TV Created.
2013-07-03 MD Major overhaul to generate stimuli much easier now there is
support for multiple lists.
\******************************************************************************/
requires 2.6;
import std_windows1;
import std_texts_nl;
import std_entry_page1;
import std_exit_page1;
import std_pause_page;
import std_blank_page;
import io_beexybox;
import test::task;
import test::generate_objects;
Experiment experiment
{
on_event:entry()
{
show_test_windows();
}
on_event:message()
{
// On Ctrl+F4 jump unconditionally to the thank-you part.
if (message_sender == control && message_arg == SYS_STOP)
{
control.mark_experiment_aborted();
thankyou.enter();
}
}
// Decides whether to start te task or generate the
// objects and png
TransientPart decide_generate
{
on_event:entry()
{
if (generate_object_info)
generate_objs.enter();
else
welcome.enter();
}
}
// if commandline option --generate is present all objects
// and png's are generated for all lists.
Part generate_objs
{
on_event:entry()
{
if (generate_object_info)
{
test::generate(this);
}
}
on_event:exit()
{
if (generate_object_info)
{
test::object_info_save();
control.mark_experiment_aborted();
terminate;
}
}
}
Part welcome
{
on_event:entry()
{
entry_page.set_text(WELCOME_TEXT);
entry_page.action(this, 0s);
}
}
Part phase1
{
on_event:entry()
{
test::action(this);
}
}
Part thankyou
{
on_event:entry()
{
control.end_experiment(); // Check-in session.
exit_page.set_text(THANK_YOU_TEXT);
exit_page.action(this, 10s);
}
on_event:exit()
{
// Save object information (when in object info generation mode).
test::object_info_save();
}
}
}