Mouse responses

Georg Odenthal odenthal at soz.psychologie.uni-konstanz.de
Tue Jul 15 12:04:58 UTC 2003


Hello Dr. Mitchell,

> Could someone tell me how to enter a right and left click as allowable
> responses when using a mouse as input device to respond to stimuli?
I've had this problem myself once and I couldn't find any
documentation on that in the original E-Prime manuals.

Fortunately the mouse responses are not much different from what PST
used in MEL2. That is the left mouse button is referred to as 1 and
the right mouse button is 2 (the button in the middle, if you're
using a three button mouse, is 3 as far as I know (in MEL2 it was 4,
but that's a different matter)).

So if you want to record left and right mouse button presses just
enter 12 in the allowable field in the Response Option field of any
image display, text display, slide or text display field. Set the
correct field (or the attribute you refer to in the correct field) to
either 1 or 2 for the correct left or right mouse button press
respectively.

If you intend to access the pressed mouse button from an InLine script
use the following commands:

If (Mouse.Buttons) then
        If (ebMouseButton1) Then
                debug.print "Left mouse button was pressed."
        end if
        If (ebMouseButton2) Then
                debug.print "Right mouse button was pressed."
        end if
        If (ebMouseButton3) Then
                debug.print "Middle mouse button was pressed."
        end if
end if



I hope this clarifies your question.


Best regards,
 Georg Odenthal


 =========================================================================

Georg Odenthal (Dipl.-Psych.)             University of Konstanz
+49 (0)7531 88-2872                       Department of Psychology
odenthal at soz.psychologie.uni-konstanz.de  Social Psychology and Motivation
http://www.socpsych.uni-konstanz.de       78457 Konstanz, Germany

 =========================================================================



More information about the Eprime mailing list