InLine response time data logging

Anthony santistevan64 at gmail.com
Tue Jul 12 21:34:21 UTC 2011


The problem that I encounter when I try to use automatic data logging
is that it logs the first response, regardless of where it is on the
screen. I only want to log the response time that it took for the
subject to click within the boundaries of the box on the screen.My
code is below, if this helps:

      'This code was taken from
http://groups.google.com/group/e-prime/browse_thread/thread/6411f6b4b8614f19/b794d83bb662dfef?pli=1
	   'and adapted for use by Anthony *******

	   'Designate "theState" as the Default Slide State, which is the
       'current, ActiveState on the Slide object "Stimulus"
        Dim theState as SlideState
        Set theState = DisplayScreen.States("Default")
        Dim next_mX as Long, next_mY as Long
        Dim strHit As String
        Dim theMouseResponseData As MouseResponseData
        Do
        'Was there a response?
                If DisplayScreen.InputMasks.Responses.Count > 0 Then
                        'Get the mouse response
                        Set theMouseResponseData =
CMouseResponseData(DisplayScreen.InputMasks.Responses(1))
                        'Determine string name of SlideImage or
SlideText object at
                        'mouse click coordinates. Assign that value to
strHit
                        strHit =
theState.HitTest(theMouseResponseData.CursorX,
theMouseResponseData.CursorY)
                        'Compare string name where mouse click
occurred to CorrectAnswer
                        'attribute on each trial, and dispense a treat
if they are equal (i.e., the target was clicked)
                        'NOTE: This comparison is case sensitive
                        If strHit = "Image1" Then
							writeport &H378,1
							WritePort &H378,2
                        End If
                End If
                Do Until (strHit = "Image1")
                'Capture & process further mouse clicks:
                        If (Mouse.Buttons And ebMouseButton1) Then
                                Mouse.GetCursorPos next_mX, next_mY
                                strHit = theState.HitTest( next_mX,
next_mY )
                        End If
                        If strHit = "Image1" Then
							writeport &H378,1
							WritePort &H378,2
						End If


				'Loops until the button is clicked
                Loop
        			Loop Until (strHit = "Image1")

On Jul 12, 12:47 pm, David McFarlane <mcfar... at msu.edu> wrote:
> Anthony,
>
> 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...
>
> Not sure that I fully understand the issue, but if you have an input
> mask launched from a stimulus object called, say, StimSlide, then you
> may log responses at any time using inline code such as
>
> c.SetAttrib "StimSlide.Resp", StimSlide.Resp
> c.SetAttrib "StimSlide.RT", StimSlide.RT
>
> You can see this for yourself just by looking at the logging code
> automatically generated by E-Studio whenever you enable logging.
>
> For that matter, just because you do not want the Slide to advance on
> a mouse click does not mean that you cannot use automatice data
> logging on it.  Try enabling data logging on your stimulus Slide, and
> see if that does it for you.
>
> -- David McFarlane, Professional Faultfinder
>
>
>
>
>
>
>
> >I am currently having issues logging the response time from a slide.
> >The program setup is such that the slide does not advance until an
> >InLine conditional has been met (the subject clicks on a box). The
> >slide advances fine; however, the response time data is not logged
> >because I have setup the slide properties such that it does not
> >advance on any click (because I only want clicks in the box to
> >advance the slide). My question is: how can I log response times
> >from an InLine code under certain conditional circumstances?
>
> >Thank you,
> >Anthony

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