Experiment(){
Context(){
AssignmentGroup(){
ExperimentName = "Multiple Choice Response Method";
SubjectCode = "pxlab";
SkipBoundingBlockDisplays = 0;
new QueryCode = 0;
new QueryFormat = "%SubjectCode% %QueryCode% %Trial:Query.MultipleChoiceQuestion.Selection%";
new RTFormat = "%SubjectCode% %QueryCode% %Trial.SimpleDisk.ResponseTime@i%";
StopKey = de.pxlab.pxl.KeyCodes.SPACE_KEY;
}
Session();
Block:Query( TrialFactor, RandomizeTrials){
Instruction(){
Text = ["Some Personal Data", " ", "Please answer the following questions by selecting one of the choices. ", "Press the SPACE bar to indicate that your selection is valid.", " ", "Press any key now to start!"];
}
}
BlockEnd:Query(){
BlockEndMessage(){
Text = "Thank you for answering the personal questions";
}
}
Trial:Query( DataFileTrialFormat, QueryCode, MultipleChoiceQuestion.Text, MultipleChoiceQuestion.Choices, MultipleChoiceQuestion.Selection){
MultipleChoiceQuestion(){
Timer = de.pxlab.pxl.TimerCodes.MOUSE_TRACKING_STOP_KEY_TIMER;
Unique = 1;
Selection = "";
}
}
Block( TrialFactor, TrialCounter){
TextParagraph(){
Text = ["We are now ready to start the data collection.", " ", "Please press any button, as soon as you see the target.", " ", "Press any key to go on!"];
}
}
BlockEnd();
Trial( DataFileTrialFormat, QueryCode, SimpleDisk.ResponseTime){
ClearScreen(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 500;
}
SimpleDisk(){
Timer = de.pxlab.pxl.TimerCodes.RESPONSE_TIMER;
Size = 200;
ResponseTime = "";
}
Feedback(){
Text = "%Trial.SimpleDisk.ResponseTime@i% ms";
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 1000;
Visible = 1;
}
}
// Command line assignments
AssignmentGroup();
}
Procedure(){
Session(){
Block:Query( 1, 0){
Trial:Query( QueryFormat, 1, "Are you", ["female?", "male?"], ?);
Trial:Query( QueryFormat, 2, "How old are you?", ["under 10", "between 11 and 20", "between 21 and 40", "41 or older"], ?);
Trial:Query( QueryFormat, 3, "Are you wearing corrective lenses?", ["yes", "no"], ?);
}
Block( 5, 0){
Trial( RTFormat, 0, ?);
}
}
}
}