Participants´ response via space key

3,209 views
Skip to first unread message

Claudia

unread,
May 25, 2011, 3:21:10 PM5/25/11
to E-Prime
Hi,

I am very new to e-prime and, after having spent hours pouring on the
manuals, I have yet to find the solution to a likely elementary (!)
matter: How do I make the software accept 1) that the space key is an
"Allowed response", and 2) that absence of response is also an
"Allowed response". My experiment is a visual recognition task in
which my participants are supposed to press 'space bar' only if the
target flashed on screen (i.e. a triangle) has been preceded by some
specific stimuli, but not to press anything at all if the rule is not
met.

Thank you in advance for your help,
Claudia

liwenna

unread,
May 26, 2011, 4:51:20 AM5/26/11
to E-Prime
Hi Claudia,

this is indeed very elementary... did you also check the 'manual'
called 'an e-primer'? It can be downloaded here: step.psy.cmu.edu/
materials/EPrimer.pdf
I don't know it by heart but I daresay it should contain your answers
and otherwise be helpful for you.

As for the allowed response: this simply defines which buttons are
being 'read' by e-prime. If a certain button is not defined response,
one can press it however much they like, e-prime will not respond to
it. To make the spacebar the only allowed response (no response is not
a response, so you don't need to "allow" it) enter {SPACE} into the
allowed responses field.

However, the remaining of your question pertains not to how to set an
allowed response but to how to set a correct response. To achieve what
you want to achieve, make an attribute in your list that contains the
correct response, call it "correctresp" or something the like. For
trials in which space is the correct response give it value {SPACE},
for trials in which no response is the correct response give it value
"" (two times ", nothing inbetween). Tell your slide that this
attribute contains the correctresponse by entering [correctresp] into
the correct response field of the slide. In order to make it possible
that no response is given ("allow" no response, if you like...) give
the slide a set duration (1000 ms for instance, instead of infinite)
so that it always disappears after a given time (even if no response
is made). You can keep the end action at terminate if you want the
slide to disappear after space is pressed or set it to none of you
want it to remain for the set duration even after spacebar is pressed.

Best,

liw

Claudia

unread,
May 26, 2011, 6:21:25 AM5/26/11
to E-Prime
Thank you very much, liw! This was really helpful: the value "" was
the one I could not figure out, and because of it the experiment would
just stop every time I tried to run it. I will now try it again and
also follow your other advices re. lack of response as "correct
response".
Thank you also for the link to the manual.

Best,
Claudia

Claudia

unread,
May 26, 2011, 9:13:01 AM5/26/11
to E-Prime
Hi again,

I am clearly doing something wrong since, although I believe I
followed your (and the manual) instructions, I keep getting the same
error window. Could you please look at it and let me know if it tells
you something? I am copy-pasting below the section containing the
'bug' - The last line seems to be the critical one.
Thank you very much,
Claudia

Sub PracticeProc_Run(c as Context)

Fixation.Run

Blank.Run

PrimePractice.Text = c.GetAttrib("PrimePractice")
PrimePractice.Run

Blank1.Run

Stimulus.ActiveState = c.GetAttrib("Stimulus")
Stimulus.Run

ResponseTrial.InputMasks.Reset

If Keyboard.GetState() = ebStateOpen Then
ResponseTrialEchoClients.RemoveAll
ResponseTrial.InputMasks.Add Keyboard.CreateInputMask("{SPACE}",
c.GetAttrib("CorrectAnswer"), CLng(ResponseTrial.Duration), CLng("1"),
ebEndResponseActionNone, CLogical("Yes"), "", "", "ResponseMode:All
ProcessBackspace:Yes")



On May 26, 10:51 am, liwenna <liwe...@gmail.com> wrote:

liwenna

unread,
May 26, 2011, 9:36:00 AM5/26/11
to E-Prime
What is the text of the error message you get?

Also: with the error you should receive a referral to a specific line
in the code... does this refer to the last line of the code you
posted? quite frankly, I can't read much into it :s

David McFarlane

unread,
May 26, 2011, 11:34:21 AM5/26/11
to e-p...@googlegroups.com
Claudia,

You and liw are already working this out. I just wanted to add that
you can get more information about using special characters for
Allowable and Correct by looking at the "(key} nomenclature" topic in
the E-Basic Help facility. Also to reiterate that to accept "no
response" as a "response" you logically need to set a Duration for
the stimulus to expire, and a Time Limit for the input mask that gets
the response (typically leave that at (same as duration), unless you
want to use "Extended Input" -- work through Appendix C of the User's
Guide that came with E-Prime).

-- David McFarlane, Professional Faultfinder

Claudia

unread,
May 26, 2011, 3:39:25 PM5/26/11
to E-Prime
The error message says "Run-time Error (Line 438) 10018: Correct
Response is not part of Allowable" which - according to the cursor on
my screen, is the last line in the script-segment I sent earlier. I
have set the Time limit, and checked carefully that {SPACE} is
correctly written both in the appropriate attribute column and in the
"Allowed response" box. I am not sure if you could get a better idea
of the possible problem if I send you a longer segment of
script,.....or would you have any other suggestion?

Thank you very much for your help,
Claudia

liwenna

unread,
May 27, 2011, 4:36:17 AM5/27/11
to E-Prime
Hi Claudia,

My bad... There was this little nagging voice in my head yesterday
saying that something wouldn't work about what I wrote... and this is
probably it :p

Maybe I was mistaken by advicing you to use "". Brandon's post in this
thread on the PST forums (http://www.pstnet.com/forum/
Topic1311-5-1.aspx#bm1824) makes me thinkt that, while "" is used for
a 'no-response' when writing inline code, it is not needed to place
the brackets around the 'nothing' when the cresp is defined in a
list.

So... first try removing the "" and run the task with {SPACE} in the
go trials and nothing in the nogo trials, if that doesn't work then
try expanding the collection of allowed responses to {ANY}. In the
current set-up the program checks to see if "" (cresp) is part of
{SPACE} (allowed responses) which it obviously isn't. By allowing any
key Pp can also press other buttons than spacebar but chances of them
doing that aren't that big...

Best,

liw

Claudia

unread,
May 27, 2011, 10:05:03 AM5/27/11
to E-Prime
Thanks liw!
I´ll follow your advice....hoping for the best :-)
Claudia
Reply all
Reply to author
Forward
0 new messages