zooming in and out of stimuli with key press/or joystick, repeating the trial for every incorrect response


1 comment

  • Avatar
    Gorkem Er (Edited )

    Hey Lavanya,

    I am probably so late to answer this, but I found an overall solution to the questions you raised. I included it here just in case anyone might have similar issues in the future.

    You can implement the "ProcessJoystick" inline code that e-prime people wrote in the JoyStickSample.e2 (I included the source below this post). 

    2) for this I created a Slide object and made its duration to "0", then included an InLine with the below part is included to the "ProcessJoyStick" inline code that the sample JoyStickSample.e2 had. I basically track the joystick cursor location, and if it is higher than the center location, I increase the width and height of the image by the cursor location (Y location). Then I clear the previously drawn image to eliminate any persisting parts of the image on the screen.  

    'Loop the following until a specific point on the Slide object is passed
    Dim xM As SlideImage
    Set xM = CSlideImage(CSlide(Rte.GetObject("DirectionTask")).States.Item("Default").Objects("Image1"))
    Do While JoystickMask.IsPending()
    nCurrentY = Joystick.GetPosition.CursorY
    nDiffY = nInitY - nCurrentY
    nCurrentX = Joystick.GetPosition.CursorX
    nDiffX = nInitX - nCurrentX
    xM.Height = nCurrentY
    xM.Width = nCurrentY
    Debug.Print nCurrentY
    'Set xG = CSlideImage(CSlide(Rte.GetObject("testImageSlide")).States.Item("Default").Objects("Image1"))
    Loop Until nCurrentX > MiddleX + 150 Or nCurrentX < MiddleX - 150
    The bold parts are the things I included in the "ProcessJoystick" inline code. You can apply the same logic to the other/any questions you have. You can do those operations listed here: https://pstnet.com/ecr/#t=E-Objects%2FSlideImage-Object.htm
    [JoystickSample]: I highly recommend checking the sample task of e-prime: https://support.pstnet.com/hc/en-us/articles/115016040968-Joystick-Sample-29950-
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk