Detecting mouse clicks
Susan
susangc7 at gmail.com
Tue Nov 15 15:31:11 UTC 2011
Okay, dumb question: where is the loop? Is the slide actually
displayed more than once?
I ask this because what it looks like your code is doing is just
asking if the mouse has been pressed before the slide actually
displays. The mouse hasn't been pressed then, so you see the first
line of text. The mouse is then registered by the slide, which does
nothing (though it probably does increment the number of responses),
because there's nothing for it to do; the code that changes the slide
text has already been passed over.
(I am with David and Mich on the use of a list, but if you're that
concerned about the log level of your responses being the same across
conditions, you might consider displaying the slide, then drawing your
text on it over and over using a canvas object or similar.)
HTH,
Susan
On Nov 15, 10:15 am, ELine <elin... at hotmail.com> wrote:
> I really appreciate your help, but I can't get it to function.
>
> The general setup is this: The subject is to complete 5 tasks
> (collected in a trial list): relaxing, listening to speech, reading,
> counting backwards, and listening to music. For each trial a 5 sec
> intro is made and then 3 minutes of performing the task.
> I've defined the attributes 'Visual' and 'Sound' (to control the text
> and sound) which are both objects in my slide named Task. For the
> reading I don't want any sound, but I want a piece of text to be
> displayed. When the subject has read the text (and 3 minutes have not
> passed) they should be able to 'turn the page' bu pressing the mouse.
> When 3 minutes have passed the task should end and the intro to the
> next presented. It all works, except for the reading.
>
> In my Task slide I have defined the input masks to be the mouse with
> {ANY} in the allowed response and (none) in End Action, under advanced
> I put Max Count to 99. Most of the tasks have a separate state in the
> slide, and the reading takes in the variable 'ReadText' to be
> displayed. The InLine script (placed before the slide Task) now looks
> like this:
>
> If c.GetAttrib("Visual") = "read" Then
> c.SetAttrib "ReadText", "Page 1"
>
> If Task.InputMasks(1).Responses.Count >0 Then
> c.SetAttrib "ReadText", "Page 2"
> End If
>
> End If
>
> When comming to the reading task the text "Page 1" is displayed, but
> no matter how hard I slam on the mouse, I cannot get the text to
> change to "Page 2".
>
> I have also tried with the following script (simply to try something):
>
> If c.GetAttrib("Visual") = "read" Then
> c.SetAttrib "ReadText", "Page 1"
> Task.InputMasks.Reset
>
> If Mouse.GetState() = ebStateOpen Then
> TaskEchoClients.RemoveAll
> Task.InputMasks.Add Mouse.CreateInputMask("{ANY}", "",
> CLng(Task.Duration), CLng("99"), ebEndResponseActionNone,
> CLogical("Yes"), "", "", "")
>
> If Task.InputMasks(1).Responses.Count >0 Then
> c.SetAttrib "ReadText", "Page 2"
> End If
> End If
>
> End If
>
> But with no luck... I cannot seem to understand that my pressing the
> mouse is not registered by E-Prime. How can it not !?!
--
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