|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 7/21/2011 10:59:06 AM
Posts: 5,
Visits: 67
|
|
I have an experiment that I would like to run on a laptop tablet, using the touchscreen. I am using a Dell XT2 running XP tablet edition, with an N-trig digitizer pen (the screen also registers capacitive touch), and E-prime 2.0 professional.
When I run the experiment, an inline hittest does not consistently register taps with the pen or finger. I can tell that the computer itself is registering these taps, because when I activate the auditory feedback (play a beep with taps) in the computer's pen/touch settings, the beeps always sound with every tap. But sometimes I have to tap 10 or 11 times before E-prime registers it. When I use a mouse or touchpad click instead of a pen or finger tap on the screen, the code works perfectly and consistently.
Any thoughts on how to solve this would be very useful.
An example of the inline where this happens is below--there is a simple slide with 2 pictures: piccontinue and picexit--a click on one advances the experiment, the other exits. If I click with a mouse on the pictures, the code works perfectly. If I tap (with finger or stylus), it can take anywhere from 1 to 10 taps before the theResponseObject.InputMasks.Responses.Count registers it.
Dim numResponses as integer
Dim stateResponse as SlideState
Dim strIntroHitTest as string
Dim ptMouse as point
Dim clickcount as Integer
Dim theResponseObject As RteRunnableInputObject
Set theResponseObject = CRteRunnableInputObject(Rte.GetObject("Introduction"))
Set stateResponse = Introduction.States("Default")
clickcount = 0
Do While theResponseObject.InputMasks.IsPending()
If theResponseObject.InputMasks.Responses.Count <> clickcount Then 'a tap was made
Mouse.GetCursorPos ptMouse.x, ptMouse.y
clickcount = clickcount +1
strIntroHitTest = stateResponse.HitTest(ptMouse.x, ptMouse.y) 'see where they tapped
If strIntroHitTest = "piccontinue" Then 'If they tapped the continue picture, then continue
theResponseObject.InputMasks.Terminate
clickcount = 0
GoTo continue
ElseIf strIntroHitTest = "picexit" Then
theResponseObject.InputMasks.Terminate
clickcount = 0
GoTo Goodbyelabel
End if
End If
Loop
I also know that the mapping for assessing the location for the hittest is accurate, because in other parts of the experiment I am drawing with the pen/finger/mouse on the screen, and the drawing does map accurately to where I touch.
I thought initially this might be a problem about using the mouse in 'direct' mode versus 'emulate'. However, it occurs in both modes.
|
|
|
|