|
Post by Stuart on Aug 28, 2020 20:59:10 GMT
is there a way to turn random digits into a string? I am trying to program a digit span forward and backward in PsyToolkit. Instead of a fixed table of digits, I'm trying to use the random command to select the digits. Can I take the three variables created here and turn them into a string? So if the random #s are 4 then 6 then 0, is there a command to concatenate them into "460" -- then I could use readkeys to check the input against the string?
set $a1 random 0 9
set $a2 random 0 9
set $a3 random 0 9
delay 100
show text $a1 0 0 255 255 255
delay 1000
clear screen
show text $a2 0 0 255 255 255
delay 1000
clear screen
show text $a3 0 0 255 255 255
delay 1000
clear screen # remove stimuli
show text "?" 0 0 255 255 255
delay 1000
clear screen
readkeys $a1 10000
clear screen
|
|
|
Post by Stuart on Aug 29, 2020 2:18:40 GMT
Guess I'll program it a different way. If I program it like the Corsi task was done, I could create a table in Excel, doing the string concatenation there, instead of using the random number function in PsyToolkit.
|
|
|
Post by PsyToolkit on Aug 29, 2020 8:17:20 GMT
Currently, there are no sophisticated ways to deal with "strings". I plan to add such functions to the version after the next version which will come out later this year.
|
|