Post by hong on May 31, 2023 8:46:18 GMT
As I have been working on my research project, I discovered that the library already contains an implementation of "Self-paced reading (one word at the time) in www.psytoolkit.org/experiment-library/pacedreading1.html " which has been extremely helpful. However, I am facing several challenges with regards to implementing a new function in my experiment. I would like to display a QUESTION with three answer choices on the screen after participants have read a sentence word by word, with the option to choose the correct answer within five seconds. For example,
(1) :"It is said that John believes that Frank will talk about books about himself at the press. "
In this part, participants see one word at the time. Participants need to press the n key to go to the next word. After reading the whole sentence, there will be a QUESTION with three answers to choose from and the choice has to be made within five seconds.
(1.1) Question: The question: Who is the books about?
A=John B= Frank C=Either
I want to record the reading time of every word of (1) by pressing the key to continue, and choosing the answer of (1.1).
Following problems have popped up:
1. I have tried many times of coding, but the program always shows a "Compilation failed" error message and I am uncertain about the source of the problem.
2. In presenting the QUESTION, I previously used coding “message bitmap”, demonstrating the QUESTION and answers in a picture. Is that right? Or should I use the textbox function to present the QUESTION and answer? How to achieve it?
3. Because I have many stimuli, how to properly include my large table of stimuli using the include function?
4. I need to repeat the same piece of code in different parts of my code. For example, code “part showPhrase” including participants need to press the n key to go to the next word. Code “part showQuestion” including participants need to read the question and then choose the answer of (1.1). How to use *part* function to achieve this?
I have attached a ZIP file containing all the relevant experiment materials, including a portion of my experiment code.
I would be immensely grateful for any guidance or support that you could provide in resolving these issues.
MATERIALS:
Reading sentence:
"1.It is said that John believes that Frank will talk about books about himself at the press. "
The question: Who are the books about?
A=John B= Frank C=Either
"2.It is said that rumors about himself John expects Frank to check out at the press."
The question: Who are the rumors about?
A=John B= Frank C=Either
"3.It is said that Mary knows Alice to find pictures about himself at the press."
The question: Who are the pictures about?
A=Mary B=Alice C=Either
Part of the experiment codes:
options
fullscreen
resolution 1024 800
mouse off
fonts
arial 40
bitmaps
getReadyBlue instructions/getReadyBlue.png
question1 instructions/question1.png
question2 instructions/question2.png
question3 instructions/question3.png
include phraseTables.txt
part showPhrase
keys n
font normal
show text @3 0 -50
readkey 1 5000
clear -1 -2
while-end
save TASKNAME TABLEROW @1 @2 @3 RT @4 @5 @6 @7 @8 @9 @10 @11
part showQuestion
keys a b c
set $x 1 2 3
if $x == 1
draw off
message bitmap 0 -50
draw on
readkey @6 5000
save @3
fi
if $x == 2
draw off
message bitmap 0 -50
draw on
readkey @7 5000
save @7
fi
if $x == 3
draw off
message bitmap 0 -50
draw on
readkey @585000
save @8
fi
clear -1 -2 #limpa os dois últimos "show"
if STATUS == WRONG
show text "INCORRECT!" 0 0 255 0 0
delay 1500
clear -1 #limpa o último "show"
fi
fi
if STATUS == TIMEOUT
end tasklist #finaliza a tarefa (frase) atual e chama a próxima
fi
task sent1
mouse hide
table S1
part showPhrase
message question1
part showQuestion
task sent2
table S2
part showPhrase
message question2
part showQuestion
task sent3
table S3
part showPhrase
message question3
part showQuestion
block b1
bitmap getReadyBlue
delay 1500
tasklist
sent1 17 fixed
end
block b2
bitmap getReadyBlue
delay 1500
tasklist
sent2 16 fixed
end
block b3
bitmap getReadyBlue
delay 1500
tasklist
sent2 16 fixed
end
ZIP file: SPR_ one word at the time followed by a que....zip (44.68 KB)
(1) :"It is said that John believes that Frank will talk about books about himself at the press. "
In this part, participants see one word at the time. Participants need to press the n key to go to the next word. After reading the whole sentence, there will be a QUESTION with three answers to choose from and the choice has to be made within five seconds.
(1.1) Question: The question: Who is the books about?
A=John B= Frank C=Either
I want to record the reading time of every word of (1) by pressing the key to continue, and choosing the answer of (1.1).
Following problems have popped up:
1. I have tried many times of coding, but the program always shows a "Compilation failed" error message and I am uncertain about the source of the problem.
2. In presenting the QUESTION, I previously used coding “message bitmap”, demonstrating the QUESTION and answers in a picture. Is that right? Or should I use the textbox function to present the QUESTION and answer? How to achieve it?
3. Because I have many stimuli, how to properly include my large table of stimuli using the include function?
4. I need to repeat the same piece of code in different parts of my code. For example, code “part showPhrase” including participants need to press the n key to go to the next word. Code “part showQuestion” including participants need to read the question and then choose the answer of (1.1). How to use *part* function to achieve this?
I have attached a ZIP file containing all the relevant experiment materials, including a portion of my experiment code.
I would be immensely grateful for any guidance or support that you could provide in resolving these issues.
MATERIALS:
Reading sentence:
"1.It is said that John believes that Frank will talk about books about himself at the press. "
The question: Who are the books about?
A=John B= Frank C=Either
"2.It is said that rumors about himself John expects Frank to check out at the press."
The question: Who are the rumors about?
A=John B= Frank C=Either
"3.It is said that Mary knows Alice to find pictures about himself at the press."
The question: Who are the pictures about?
A=Mary B=Alice C=Either
Part of the experiment codes:
options
fullscreen
resolution 1024 800
mouse off
fonts
arial 40
bitmaps
getReadyBlue instructions/getReadyBlue.png
question1 instructions/question1.png
question2 instructions/question2.png
question3 instructions/question3.png
include phraseTables.txt
part showPhrase
keys n
font normal
show text @3 0 -50
readkey 1 5000
clear -1 -2
while-end
save TASKNAME TABLEROW @1 @2 @3 RT @4 @5 @6 @7 @8 @9 @10 @11
part showQuestion
keys a b c
set $x 1 2 3
if $x == 1
draw off
message bitmap 0 -50
draw on
readkey @6 5000
save @3
fi
if $x == 2
draw off
message bitmap 0 -50
draw on
readkey @7 5000
save @7
fi
if $x == 3
draw off
message bitmap 0 -50
draw on
readkey @585000
save @8
fi
clear -1 -2 #limpa os dois últimos "show"
if STATUS == WRONG
show text "INCORRECT!" 0 0 255 0 0
delay 1500
clear -1 #limpa o último "show"
fi
fi
if STATUS == TIMEOUT
end tasklist #finaliza a tarefa (frase) atual e chama a próxima
fi
task sent1
mouse hide
table S1
part showPhrase
message question1
part showQuestion
task sent2
table S2
part showPhrase
message question2
part showQuestion
task sent3
table S3
part showPhrase
message question3
part showQuestion
block b1
bitmap getReadyBlue
delay 1500
tasklist
sent1 17 fixed
end
block b2
bitmap getReadyBlue
delay 1500
tasklist
sent2 16 fixed
end
block b3
bitmap getReadyBlue
delay 1500
tasklist
sent2 16 fixed
end
ZIP file: SPR_ one word at the time followed by a que....zip (44.68 KB)