Press and release with joystick input

David McFarlane mcfarla9 at msu.edu
Fri Nov 11 18:01:21 UTC 2011


Erika,

Hmm.  Much more interesting puzzle now, I did not 
realize that you were setting Allowable by means 
of attributes defined in code.  And your 
description was short, clear, and complete enough 
that I went ahead and tried this for myself, 
pasting in the inline code & Allowable directly 
from your e-mail -- everything worked fine for me, no error.

So I have to guess that you mistyped something in 
setting up your SRBox Allowable, or something 
else goes on in your program so that, by the time 
it gets to your SRBox, your attributes do not 
have the values that you think they do.  I would 
try using a MsgBox or Debug.Print (or even a 
TextDisplay or Slide) to verify the values of 
those attribute just before you use them with the SRBox input mask.

Finally, if it does all work with Keyboard, then 
you might try setting SRBox to Emulate 
Keyboard.  But even if that appears to work, I 
fear that it would just cover up some other 
lingering problem, so best to get to the bottom of this correctly.

-- David McFarlane


At 11/11/2011 12:38 PM Friday, you wrote:
>Ouch, that is one long concatenation - I'd think 
>there's just some syntax error. Could be not, 
>though, but then I'd assume that at that level 
>of your experiment, the attribute LeftKey, for 
>instance, cannot be read, at which point 
>{-[LeftKey]} would read {-}. Is it always the 
>same button? Also, just as a suggestion: I'm 
>often too lazy to delete previous input masks, 
>even if I go from keyboard to SRBox, for 
>instance, but, as they are independently coded, 
>I sometimes fail to set BOTH input masks to a 
>new input, thus leading to confusing errors.
>
>On a related topic, I was wondering whether it 
>was a good idea to rigidly set allowable keys in 
>the first place instead of, as David suggests, 
>just doing {-ANY}. Of course, with Press 
>Spacebar to Continue, there's a difference, but 
>imagine you have a priming experiment with C 
>(left) and M (presses), and for one reason or 
>another, you participant is a bit dull and 
>presses V (right next to C). If it is no 
>allowable key, this is NOT scored as an error. 
>In fact, your participant may then go on and 
>press, a hundred msec later, the correct C key. 
>In this scenario, it is impossible to find out 
>in your data whether your participant was just 
>slow for some reason (thus messing up your 
>effect). If, however, you would have just used 
>{ANY} allowable mask, you at least know 
>afterwards they made an error. Anyway, just a thought.
>
>Best,
>Mich
>
>Dr. Michiel M. Sovijärvi-Spapé
>Research Fellow
>Perception & Action group
>University of Nottingham
>School of Psychology
>www.cognitology.eu
>
>
>-----Original Message-----
>From: e-prime at googlegroups.com 
>[mailto:e-prime at googlegroups.com] On Behalf Of enyhus
>Sent: 11 November 2011 16:44
>To: E-Prime
>Subject: Re: Press and release with joystick input
>
>Thanks for your response.  I've done a little more testing and the the
>experiment does work if I use {ANY}{-ANY} as input, but I am still
>confused why it did not work before.
>
>Using the following code with the keyboard input works but with the
>joystick input I get the folllowing error: The allowable response was
>unrecognized: {-}.
>Set in previous inline code:
>
>c.SetAttrib "LeftKey", "1"
>c.SetAttrib "LeftMidKey", "2"
>c.SetAttrib "RightMidKey", "3"
>c.SetAttrib "RightKey", "4"
>
>Allowable in input:
>
>{-[LeftKey]}[LeftKey]{-[LeftMidKey]}[LeftMidKey]{-[RightMidKey]}
>[RightMidKey]{-[RightKey]}[RightKey]
>
>Any ideas why this might be?
>
>Erika
>
>On Nov 10, 6:26 pm, David McFarlane <mcfar... at msu.edu> wrote:
> > Erika,
> >
> > Stock reminder:  1) I do not work for PST.  2) PST's trained staff
> > takes any and all questions 
> athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they
> > strive to respond to all requests in 24-48 hours -- this is pretty
> > much their substitute for proper documentation, so make full use of
> > it.  3) If you do get an answer from PST Web Support, please extend
> > the courtesy of posting their reply back here for the sake of others.
> >
> > That said, here is my take...
> >
> > I have no experience with joysticks in E-Prime, so I am just talking
> > off the top of my head.  And the error message that you specify looks
> > like a design-time error rather than either a compile-time or
> > run-time error, so you get it when you try to enter "{-}" into the
> > Allowable field in the object's Property Pages E-Studio.
> >
> > So what happens if you instead use "{-ANY}"?  Does it work then?
> >
> > You see, {-} means a *press* of a *dash* character, and the SRBox
> > cannot send a dash (it can send only the numbers 1-8).  (In fact, in
> > this case the notation does not even indicate a release, if you
> > wanted a relese of a dash character you would have to use {--}).  So
> > to get a release response from a SRBox, you have to use the dash
> > followed by which button you want to see released, e.g., {-1}, {-2},
> > {-ANY}, etc.
> >
> > Just a reminder to anyone else who happens to tune in, you may find
> > this general technique covered in the "{key} nomenclature" topic in
> > the E-Basic Help facility.
> >
> > -- David McFarlane, Professional Faultfinder
> >
> > At 11/9/2011 04:31 PM Wednesday, you wrote:
> >
> >
> >
> > >I have created an experiment where I need to record both press and
> > >release of responses.  It works when I use a keyboard as an input
> > >device but when I use a joystick as input device (as this is how
> > >EPrime recognizes our SRBox) I get the folllowing error: The allowable
> > >response was unrecognized: {-}.  Is it possible to use press and
> > >release with a joystick and if so, how do I specify the release?
> > >Erika

-- 
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