use input as a variable

David McFarlane mcfarla9 at msu.edu
Thu May 19 15:56:14 UTC 2011


Tobias,

At 5/18/2011 11:04 AM Wednesday, you wrote:
>I want to use the keyboard input from a slide as a variable. Usually,
>it is only available as an attribute.

Just to make sure this is clear, this statement is incorrect.  In 
fact, it is just the other way around -- usually, response 
information is available only as a variable (or more properly 
speaking, as a property of an object variable).  As Paul Groot has 
already explained, response information becomes available as 
attributes only when logging of that information has been set, or 
when you add inline to do so explicitly, e.g., c.SetAttrib 
"Respond.RESP", Respond.RESP.

>For example, if the slide is
>called "Respond", the input during that slide would be available as
>Respond.RESP. I can then use it in code like this: "if
>c.getattrib("Respond.RESP") = x then ...." and so on. It is however
>much handier to have it as a variable. Any idea how to realise that?

So, if you have a stimulus object called, say, StimSlide, and have 
attached an input mask to StimSlide, then response data will 
automatically be available as properties of the StimSlide object 
variable, e.g., StimSlide.RESP, StimSlide.RT, etc.  You need do 
nothing more.  And in that case, you could implement your example 
code simply with

If (StimSlide.RESP = x) Then ....

etc. -- i.e., same as before, just strip out the surrounding 
c.GetAttrib("...").  If you then also want those properties available 
as attributes, you need to enable logging for the desired properties 
or add inline code as indicated above.

-- David McFarlane, Professional Faultfinder

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list