recording a mouse click response as 'correct'
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



recording a mouse click response as 'correct'... Expand / Collapse
Author
Message
Posted 11/26/2010 6:20:12 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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)

Post #5060
Posted 11/26/2010 10:42:03 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum 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
Post #5061
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 11:25pm

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0.063. 8 queries. Compression Disabled.
 
Privacy | Terms of Use | Terms and Conditions | Legal Trademarks | Authorized Use | Quality Policy
Copyright 2012 Psychology Software Tools, Inc. All Rights Reserved
Email: Info@pstnet.com | Telephone: 412.449.0078 | Fax: 412.449.0079