Inline code to change a letter response to a numerical value

mvinski mtvinski at gmail.com
Fri Mar 1 17:37:52 UTC 2013


Hello fellow Eprimers - 

I am programming an EEG experiment using Eprime 2 and need to change 
participants letter responses (they respond pressing either the F or J key) 
into a numerical response (where the an F response would be coded as a 1, 
and the J response would be coded as a 2). 

As of right now I have written a code so that the trigger values for 
participants' response (SelfAnswer.RESP), and those responses are either an 
F or a J. The code is as follows:

If c.GetAttrib("ProcedureType") = "1" Then
strTrialInfo = c.GetAttrib("Valence") & "-" & c.GetAttrib("ProcedureType")
ElseIf c.GetAttrib("ProcedureType") = "2" Then
strTrialInfo = c.GetAttrib("Valence") & "-" & c.GetAttrib("ProcedureType") 
& "-" & SelfAnswer.RESP
End If

The response keys have to stay as F and J - but for the trigger code the 
responses need to be either a 1 or a 2. 

Does anyone have any ideas? 

Thank you thank you thank you in advance,

M

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/e-prime/-/NNj1f-Ov3mMJ.
For more options, visit https://groups.google.com/groups/opt_out.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20130301/e154d75a/attachment.htm>


More information about the Eprime mailing list