Post by alex on Nov 6, 2020 15:25:07 GMT
Hi all !
I would like to use an adaptation of the SART.
The trials are as follow:
Number Display (250ms) than Mask display (900ms)
During this trial, the participant has to press the spacebar (only for some numbers but whatever)
This is coded by with a readkey after the number and another readkey after the mask.
However, I think there is a little problem: it seems that if one presses the spacebar just between the number and the mask, the program does not detect the press.
I'm not sure but I think that it could be due to the two readkeys used...
Has anyone had a similar problem? Is there a solution?
Alex
Here the sample of the code for the task:
task sart
keys space
set $current_digit &&mydigits remove first
set $random_font random 2 6
set $digit_size expression $random_font - 1 ## for report in save line
font $random_font
show text $current_digit
readkey 1 250
show bitmap mask
if STATUS != TIMEOUT
set $my_rt RT
fi
if STATUS == TIMEOUT
readkey 1 900
set $my_rt expression RT + 250
fi
## the whole intertrial interval is 1150 ms (250 + 900)
set $remaining_time expression 1150 - RT
## determine status of response and show feedback if necessary
set $mystatus 1 ## assume people respond correctly
if $current_digit == 3 && STATUS != TIMEOUT
$mystatus = 0 ## pressed when there was a 3
show bitmap mistake_wrong_press
delay 3000
clear -1
delay 500
fi
if $current_digit != 3 && STATUS == TIMEOUT
$mystatus = 0 ## not pressed when there was no 3
show bitmap mistake_missed
delay 3000
clear -1
delay 500
fi
if $mystatus == 1
delay $remaining_time ## only wait if there was no mistake
fi
## determine trial type (1=go,0=no-go)
set $trial_type 1
if $current_digit == 3
set $trial_type 0
fi
save BLOCKNAME BLOCKNUMBER $trial_type $current_digit $digit_size $mystatus RT