|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 11/26/2010 8:38:26 AM
Posts: 1,
Visits: 6
|
|
| I am presenting four pictures and a sound, and participants have to click on one picture. In analysis, Edata is recording all mouse clicks as '2' for some reason. How do I set up that the correct response is 'picture1' and allow Eprime to record a click as the correct response? (I'm using a touch screen, so don't want to have a keyboard as the input device, the 'mouse' input device works fine with my touch screen)
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 8/3/2011 5:26:13 PM
Posts: 72,
Visits: 217
|
|
Hi Hanna,
The '2' stands for the right mouse button (1 = left mouse button). The thing you need is known as the 'dohittest' and is documented both in the resources section of this site as well as in the e-basic help within the estudio program.
It boils down to adding an inline right after your slide that fetches the name of the object that was clicked on (picture 1 in your case) and compares this to an attribute called correctresp that you'll have to create which contains the correct resp (picture 1). The program will tweak the .acc attribute and log the name of the object that was clicked on into the attribute response:
***********
'Designate "theState" as the Default Slide State, which is the
'current, ActiveState on the Slide object "Stimulus"
Dim theState as SlideState
Set theState = Stimulus.States("Default")
Dim strHit As String
Dim theMouseResponseData As MouseResponseData
'Was there a response?
If Stimulus.InputMasks.Responses.Count > 0 Then
'Get the mouse response
Set theMouseResponseData = CMouseResponseData(Stimulus.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 score response
'NOTE: This comparison is case sensitive
If strHit = c.GetAttrib("Correctresp") Then
Stimulus.ACC = 1
Else
Stimulus.ACC = 0
End If
End If
c.SetAttrib "response", strHit
*********
Hope this helps you out,
best,
liw
|
|
|
|