Experiment(){
Context(){
AssignmentGroup(){
ExperimentName = "Text Input Method";
SubjectCode = "pxlab";
TrialFactor = 1;
RandomizeTrials = 0;
StopKey = de.pxlab.pxl.KeyCodes.ENTER_KEY;
}
Session(){
Instruction(){
Text = ["Text Input Method", " ", "You will be asked a question and should type in the response on the keyboard. Input is finished by pressing the RETURN key.", " ", "Press any key now to start!"];
}
}
SessionEnd(){
SessionEndMessage(){
}
}
Trial( Message.Text, TextInput.Text){
Message(){
Timer = de.pxlab.pxl.TimerCodes.NO_TIMER;
FontSize = 32;
}
TextInput(){
Overlay = de.pxlab.pxl.OverlayCodes.TRANSPARENT;
LocationY = 200;
FontSize = 32;
}
Feedback(){
Text = "You said\n%Trial.TextInput.Text%";
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 1000;
}
ClearScreen(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 300;
}
}
// Command line assignments
AssignmentGroup();
}
Procedure(){
Session(){
Block(){
Trial( "Please enter your name!", ?);
Trial( "And how old are you?", ?);
}
}
}
}