Detecting mouse clicks

Michiel Spape Michiel.Spape at nottingham.ac.uk
Tue Nov 15 11:03:04 UTC 2011


Hi,
Three things:
- I find Task.InputMasks(1).Responses.Count more appropriate, since .InputMasks is a collection (sometimes of 1). It turns out, however, that E-Prime has no problems with that (I assume this is VB's lazy tolerance, resulting in having a hard time learning other languages).
- *It does not work*. What, E-Prime fails to show your Task slide? Or, the text is not updated? Is Task an 'unreferenced object' (called in inline)? Do you actually do something like Task.Run (otherwise I see no way of showing "Page 1 of the book"). I find calling unreferenced objects in this way not always as easy as all that, with inputmasks not responding and such. I'm sure somebody else can help better at that aspect - personally, I tend to go for referenced objects again, saving code and making the experiment more transparent. Or, finally, do you get some run-time error? 
- Why do you want to refer to "Task.InputMasks.Responses.Count" if you merely want to go to the next slide? Here's what I'd do:
1. A list with one attribute, "myPageContent", with, on level 1 "Page 1 of the book" and on level 2 "Page 2 of the book". Sequential selection, one procedure. Exit list, after 180000 (3 minutes).
In the procedure
2. A textdisplay showing the text [myPageContent]. One input object (just in the properties, no messing with inline needed), mouse, allowable {ANY}, duration 60000 (or something). 

Done, mouse click proceeds to next page, no code necessary. Obviously, you could with minimal code get it to work so that left mouseclick goes one page back and right mouseclick proceeds. 
Hope that helps,
Mich


Dr. Michiel M. Sovijärvi-Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology
www.cognitology.eu


-----Original Message-----
From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of ELine
Sent: 15 November 2011 10:39
To: E-Prime
Subject: Detecting mouse clicks

Hi,

I have a problem with a very straight-forward piece of code that I
hope you can help me with.
The task is simply to detect a mouse click (in no particular place on
the screen) in order to change the displayed text. Essentially I want
to have the subject to page through a book using the mouse for 3
minutes and then proceed to the next trial. As far as I reckon the
InLine should look something like this:

Task.Text= "Page 1 of the book"

If  Task.InputMasks.Responses.Count = 1 Then
   Task.Text= "Page 2 of the book"
End If

But it doesn't work!! I've tried add a line creating an inputmask
(Task.InputMasks.Add Mouse.CreateInputMask), but matter what I do I
cant get a response.

Does it have something to do with where I place the InLine (before
Task) and what type of object Task is (I've tried with both
TextDisplay and Slide).

I hope to hear from you.
ELine

-- 
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.

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