HELP : A SIMPLE FORCED CHOICE TASK but cannot do !

228 views
Skip to first unread message

pan_...@yahoo.fr

unread,
Apr 6, 2011, 3:23:36 PM4/6/11
to E-Prime
Hi Dear,

I send this mess because I need help.

Im not a big user and just want to do something very very simple but
I spend hours now and cannot find any good solution...

To resume,
I just want to show few pictures randomly in a sub object (no problem
for this...)

Then, I just want to ask people to choose one picture with the mouse
and click on it.

I just want to record the name of the pictures who have been clicked.
That's all !!!

Unfortunately, it seems to be something hard to do. I asked to the
support EPRIME and people send me a experiment files, the name is
"response aeras for mouse" but it seems to be so different from what
we search...

If someone knows a way...

Cheers
¨Pierre

pan_...@yahoo.fr

unread,
Apr 6, 2011, 3:50:36 PM4/6/11
to E-Prime
When I look at DOHITTEST, I know there is a way to "simply record" in
the data files the name of a jpeg present clicked from the sub
object...

liwenna

unread,
Apr 6, 2011, 4:44:18 PM4/6/11
to E-Prime
z0mg... don't panic!!


Hi "Pierre,

I you found the dohittest example you're nearly there! Implement it in
an inline after the slide that you want to record the response to, do
adjust the code to actually read the slide that you want it to read
from (see caps in stringhitcode pasted below). Also: in your triallist
create an attribute called 'Correctresp' in which you enter the
filename of the .jpg that is the correct answer for each level.

***********
'Designate "theState" as the Default Slide State, which is the
'current, ActiveState on the Slide object "Stimulus"
Dim theState as SlideState
Set theState = ENTERNAMEOFSLIDEHERE.States("Default")

Dim strHit As String
Dim theMouseResponseData As MouseResponseData


'Was there a response?
If ENTERNAMEOFSLIDEHERE.InputMasks.Responses.Count > 0 Then

'Get the mouse response
Set theMouseResponseData =
CMouseResponseData( ENTERNAMEOFSLIDEHERE.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

*********

Do report back whether or not that solves your problem :)

Best,

liw

liwenna

unread,
Apr 6, 2011, 4:49:13 PM4/6/11
to E-Prime
and I am making the same mistake as I did last time I posted this code
>.<

*****
If strHit = c.GetAttrib("Correctresp") Then
Stimulus.ACC = 1
Else
Stimulus.ACC = 0
End If
*****

should read:

*****
If strHit = c.GetAttrib("Correctresp") Then
ENTERNAMEOFSLIDEHERE.ACC = 1
Else
ENTERNAMEOFSLIDEHERE.ACC = 0
End If
*****

pan_...@yahoo.fr

unread,
Apr 7, 2011, 2:08:44 PM4/7/11
to E-Prime
Thanks a lot... but Im not shure to understand... Because there is no
"correct response"... Imagine I have 5 pictures in the slide ? I will
try to edit something with your informations thanks a lot... I already
tried to adapt the hittest without any success...
> > > object...- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

pan_...@yahoo.fr

unread,
Apr 7, 2011, 2:31:20 PM4/7/11
to E-Prime
To explain...
I have, for example, two images : a.jpg and b.jpg
I want randomize the Left or right position of the pictures.
So I create in the trial 2 attributes [stim1] and [stim2] and put it
on 2 samples on the cycle.
Now, it's OK, in my subobject I have two images directly load by this
attributes...
Then, people click by choice on the LEFT or the RIGHT image... there
is no only one correct answer... if I create a third attribute, like
correctanswer and specify that for example a.jpg is the correctanswer,
I just have a "1" written on the datafiles... It's not enough for what
I want to do... the problem come from the logical of a
correctanswer... I don't know if I am enough clear !

liwenna

unread,
Apr 8, 2011, 12:51:31 PM4/8/11
to E-Prime
Hiya Pierre,

Then don't create the correctanswer attribute ;) Simply ditch these
lines:
***
'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
*****

Do keep the line that reads:

c.SetAttrib "response", strHit

it should make an attribute called response appear in your log files
telling you on which image the response was made.

The "1" that you see in the attribute slidename.resp represents the
left button of the mouse, if you would have clicked on the image with
the right button then it would have read "2". Nothing useful there...
ignore slidename.resp.

best,

AW

Lidia Suarez

unread,
Apr 11, 2011, 1:22:23 AM4/11/11
to e-p...@googlegroups.com
Thanks AW,
 
As Pierre, I also had a similar problem. Thanks for the script, it has been very helpful.
 
Regards,
Lidia


liwenna

unread,
Apr 12, 2011, 6:49:43 AM4/12/11
to E-Prime
You're welcome Lidia. Glad to have been of help.

Happy testing!

pan_...@yahoo.fr

unread,
Apr 12, 2011, 8:42:10 AM4/12/11
to E-Prime
I need to try that... Unfortunately I had not so much time so I found
a solution with the VisualScale. I put number 1 and number 2 besides
the pictures and ask to participants to don't click on the pictures
but on the visualscale... Then If I got 5 images, I put a 5-likert
visual click... Pretty artisanal but it worked for last week. But I
want to do better. I need to try your solution Liwenna...
> > Lidia- Masquer le texte des messages précédents -
Reply all
Reply to author
Forward
0 new messages