multiple mouse reactions in one trial

liwenna liwenna at gmail.com
Thu May 26 10:21:41 UTC 2011


hmmmz despite Michiels more educationally responsible answer I tried
to conjure something up for you.

I believe it's possible to record multiple responses during one show
of a slide... but you can't alter the slide while it's being shown.
You do want to change it (i.e. you want the clicked number to
disappear) so therefore you'll have to change the slide after each
response is given and then show it again.

One could use different slidestates to show 'the same slide' with
different appearances (i.e. a different number of text boxes) but..
you'd need 24 slidestates (4*3*2*1) while if I remember correctly,
only 12 are allowed, so that's not really an option.

What is?

Use a slide with four textboxes... each textbox will contain one
number, store the numbers in four attributes in a list (n1, n2, n3 or
whatever you like) and tell the four textboxes to find their 'text'
from these attributes by entering [n1], [n2], etc in the text fields.
By default the textboxes will be named text1, text2, text3 etc, which
is fine,  you could change their names, doesn't really matter. Enable
the mouse on the slide and set the end action to terminate, log the
response time.

On your trial procedure, directly after the slide place an inline
containing this code:

*******
If responsecount = 0 then c.setattrib "slidestarttime",
SLIDENAME.OnsetTime

'tell the program which slide we are talking about
        Set theState = SLIDENAME.States("Default")

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

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

'if strHit remains empty, i.e. the mouseclick was not made on one of
the textboxes, then go back and show the slide again
                if strHit = "" then goto backlabel

'keep a count of the number of responses given so far
                Responsecount = responsecount +1

'log the name of the textbox that was clicked under response1,
response2, response3 etc, dependent on the value of responsecount
'log the responsetime for this response under response1.rt,
response2.rt, etc, also dependent on the value of responsecount.
Calculate the responsetime by subtracting the
'onsettime of the first showing of the slide (stored under
slidestarttime) from the timestamp of the new response
(SLIDENAME.RTTime).
	       c.SetAttrib "response"& responsecount, strHit
	       c.SetAttrib “response”& responsecount &“.rt”, SLIDENAME.RTTime
- c.getattrib ("slidestarttime")

'change the text of the textbox was clicked to nothing: ""
 
CSlideText(SLIDENAME.States(Slide1.ActiveState).Objects(strHit)).text=“”

'if less than 4 response have been given, go back to show the slide
again
               if responsecount <4 then goto backlabel

         End If

'reset the response counter for the next trial
Responsecount = 0
************

replace every instance of SLIDENAME with the actual name of your
slide. The variable responsecount should be created by writing the
line "dim responsecount as integer" (no "'s) on the user tab of the
script window. Place a label on the procedure right before your slide,
call it backlabel. This is a kind of 'marker', at the end of the code
the program will return to that 'place in the procedure' when it
encounter the line containing 'goto backlabel'.

So basically what it does is the following: it determines the name of
the textsubobject that was clicked on and stored this name under
'strHit'. If there is no value stored in strHit then the click was
made outside of the textbox areas and the program goes back to show
the slide again in it's current state. If that is not the case then
strHit is stored as the given response and so is the response time.
After that it replaces the text of the subjectobject with the name
that is stored under strHit (i.e. the box that was clicked on) with ""
which is... nothing. This way the clicked number will (hopefully :p)
disappear. It then goes back to backlabel and shows the slide again,
rinse and repeat until 4 responses have been given.

I haven't tested this code, it might be full of minor and/or major
errors.. but something like this should, generally speaking, work...
you could just give it a try ;)

especially this line might be problematic: c.SetAttrib “response”&
responsecount &“.rt”, SLIDENAME.RTTime - c.getattrib
("slidestarttime") .  If so then break it down into one line for the
calulations (create variable called erm... responsetime, then use a
line: responsetime = SLIDENAME.RTTime - c.getattrib ("slidestarttime")
followed by a separate line to log this value: c.SetAttrib "reponse"&
responsecount &".rt", responsetime .

Please le me know whether that works :)

Best,

liw




On May 26, 11:02 am, Michiel Spape <Michiel.Sp... at nottingham.ac.uk>
wrote:
> Hiya,
> The easy way would be to pay someone to code it for you!
>
> But, for anyone to help:
> - What is "little experience"? Have you read the entire getting started guide and/or additional material (linked before)?
> - Where do you get stuck?
> Best,
> Mich
>
> Michiel Spapé
> Research Fellow
> Perception & Action group
> University of Nottingham
> School of Psychologywww.cognitology.eu
>
> -----Original Message-----
> From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Alexander
> Sent: 26 May 2011 07:36
> To: E-Prime
> Subject: multiple mouse reactions in one trial
>
> Hi all,
>
> I have little experience with eprime.
> I want to do an experiment in which four digits are presented
> simultaneous on the screen. These should be selected in ascending
> order with the mouse. For every mouse click the reaction time and the
> clicked off digit should be recorded. The digit already been selected
> should be hidden. The next trial with new digits should start only
> when all four digits have been clicked.
> For notes on how I can solve this in an easily way, I would be more
> than grateful.
>
> Best regards
> Alexander
>
> --
> You received this message because you are subscribed to the Google Groups "E-Prime" group.
> To post to this group, send email to e-prime at googlegroups.com.
> To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en.
>
> This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list