|
Post by researcher on Dec 14, 2021 0:53:29 GMT
Hi,
I'd like to show the stimuli, i.e., the sentences on the table, within a time limit. Let's say for task "three", the sentences on table "read3" will be shown for only three seconds, while respondants have to press the correct button within three seconds too. Then the sentence will go away. It seems my codes aren't giving me the desired outcome. Also, I'd like to show a "timeout" text for a late response. Could somebody please help?
--------------------------------------------------------------------------------------------
table read3
"What did you tell him today?" 1 "sentence 51"
"Why has he lost his wallet?" 1 "sentence 52"
"Has he closed the door?" 1 "sentence 41"
"Turn off it" 2 "sentence 42"
"Does the event matter?" 1 "sentence 31"
"The manager forget the story?" 2 "sentence 32"
task three
table read3
show text "Choose your answer within 3 secs" -200 -200
keys g u
show text @1
readkey @2 3000
readkeys option size 30
readkeys option show -400 100
readkeys @1 30000
clear screen
if STATUS == CORRECT
show text "Well done"
fi
if STATUS == WRONG
show text "You made a mistake"
fi
delay 200
save RT STATUS @2 @3
|
|
reed
New Member
Posts: 6
|
Post by reed on Dec 15, 2021 19:51:52 GMT
Can you explain in a little more detail exactly what you want the code to do, and why it isn't working?
From looking at it, it seems to me like you're aiming for a sentence to appear on screen for three seconds, and for participants to respond inside those three seconds, as you already said. It looks like after that you want the participants to type out the sentence they saw. Is that correct?
It looks like one problem you might encounter is that your clear screen instruction is after the readkeys instruction. That has a 30 second duration, so between the 3 second readkey command and the 30 second readkeys command, the screen won't clear until 33 seconds have passed. If you want the original sentence to be shown for only three seconds, you'll need another clear screen command after your readkey command.
In addition, I'm not sure if the feedback you want to show them is after their initial, single key response, or after the typed response. If you want it after the single key response, the code you use for feedback will need to be before the readkeys command, and after the readkey command.
For your feedback code, I believe STATUS outputs 1 if correct, 2 if incorrect, and 3 if timeout, so your if statements may not work as written because they don't match the variable output.
Finally, if you want to save the status of both the single keypress response and the typed response, you'll need another save command after the readkey command as well. The save command you have is only going to save the status of the readkeys command, not the readkey command.
Hope this helps!
|
|