using joystick input for version 1.1

Matt Lenhart mplenhart at gmail.com
Wed Sep 24 01:10:49 UTC 2008


Hi Mary,

Since you are collecting a response via script (rather than through an
input mask), you would need to do something like this:

Dim lnEndTime As Long
lnEndTime = Clock.Read + 5000

Do

 If Joystick.Buttons And ebJoystickButton1 Then

  c.SetAttrib "JoystickRTTime", Clock.Read
  c.Setattrib "JoystickRT", Clock.Read - TextDisplay1.OnsetTime

  Joystick.GetCursorPos ptCursor.x, ptCursor.y

  c.SetAttrib "JoystickX", ptCursor.x
  c.SetAttrib "JoystickY", ptCursor.y

 End If

Loop Until Clock.Read > lnEndTime

This will basically loop until 5 seconds have passed, regardless of
when the subject responds (i.e., the object will stay up for 5 seconds
no matter what happens). When the response is detected, however, all
of the necessary information will be logged. This technique is covered
in several samples available on the official PST support site (Run
Trials for Specified Time, Process Responses Template).


- Matt


On Sep 23, 3:25 pm, "Mary E Smith" <maryesm... at gmail.com> (by way of
David McFarlane <mcfar... at msu.edu>) wrote:
> [This came to me personally, but I think it was meant for the list,
> so I am posting it here.]
>
> How would I make it so the experiment holds the slide for 5 seconds
> instead of moving on when the user inputs their answer?
>
> On Mon, Sep 22, 2008 at 4:17 PM, Mary E Smith<<mailto:maryesm... at gmail.com>maryesm... at gmail.com> wrote:
>
> OK thanks so much for all your help!
>
> On Mon, Sep 22, 2008 at 3:44 PM, David McFarlane<<mailto:mcfar... at msu.edu>mcfar... at msu.edu> wrote:
>
> (Replying off-list...)
> Mary,
>
> We won't be using the joystick like a mouse though--we don't want a
> cursor on the screen
>
> FWIW, I would bet that you do not need to display the cursor in order
> to get cursor coordinates from the joystick.
>
> -- David McFarlane
--~--~---------~--~----~------------~-------~--~----~
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