Feedback on the same screen as stimulus

David McFarlane mcfarla9 at msu.edu
Thu May 17 18:03:30 UTC 2012


Some time ago for some projects here I actually wrote an extensive 
library of mouse handling routines for things like this.  Sadly, I 
have not packaged that up enough to send out for general use.  But I 
can point you in the direction of some topics and tools that you will 
want to explore in order to program this for yourself.  Most of these 
are topics in the E-Basic Help facility (what serves as the technical 
reference in E-Prime; and be warned that many of their code examples 
contain programming mistakes!).  It will take a fair amount of inline 
code, and if you can wrap most of that up into custom functions & 
subroutines in the global User Script area it will make work easier.

- MouseDevice topic, esp. MouseDevice.CursorX, .CursorY, and 
.GetCursorPos, and .Buttons

- Point and Rect topics

- PointInRect topic

- SlideState.HitTest topic

- Arrays

- Clock.Read topic

- Context.SetAttrib topic

- various object & sub-object .Draw methods, e.g., SlideImage.Draw topic

- transparency, e.g., SlideImage.SourceColorKey topic

- all of the Canvas topic

And of course the usual gamut of programming concepts & structures 
(e.g., loops, conditionals).

For these uses, I found it generally easier to handle the mouse 
directly instead of using an input mask.  Then, once you can detect & 
process the subject's mouse response, you can draw over various 
stimuli in a number of ways.  You could just use the .Draw method of 
various SlideImage or other objects, possibly combined with some 
judicious use of transparency; or, simply use Canvas methods to draw 
directly over display objects.  You could even use offscreen Canvases 
with Canvas.Copy to create spectacular effects (I made things deftly 
appear and disappear that way).  I will have to leave the details for 
you to work out.

Finally, you might explore the example programs available at the PST 
web site -- I cannot think of which ones offhand, but if you browse 
through their examples you may find much of use.  (Do bear in mind 
that many of their examples provide models of *poor* programming 
practices, but they do have the virtue of providing real working 
examples, and you can build from that.)

-----
David McFarlane
E-Prime training 
online:  http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter:  @EPrimeMaster (twitter.com/EPrimeMaster)


At 5/15/2012 02:12 PM Tuesday, Beckerlab wrote:
>Hello everyone,
>
>I am programming a delayed match to sample task. I have it essentially
>running, and it works like this.
>
>An initial stimuli is displayed, like a picture of a dog, this picture
>disappears. Then, 4 pictures appear: cat, rat, dog, and pig for
>example.
>
>I need it so if the participant clicks "rat", then a red X appears
>either over the rat picture (preferably), or to replace the rat
>picture, to signify that this is an incorrect response. Then the
>participant has to pick another response, so it's like this:
>
>DOG
>(dog disappears)
>
>CAT DOG RAT PIG
>
>let's say they click pig now, a red X needs to appear over PIG, and
>the loop does NOT run again, instead, they are just displayed with the
>4 options
>
>
>CAT DOG RAT X
>
>Now, let's say they pick cat, their options are now like this
>
>X DOG RAT X
>
>X's over 2 of their choices, if they click the correct option, that
>option gets a green checkmark over it. The words "Correct" or
>"Incorrect" also need to appear at the top of the slide if possible.
>
>------------------
>
>I am not sure how to go about this... I know how feedback works in
>general, something like this (below) might work with slide states...
>but then there would be too many possible options of x's and
>checkmarks...and I'm not sure how to get the location to work.
>
>If Stimulus.ACC = 1 Then
>                 Feedback3.ActiveState = "Correct"
>Else
>                 Feedback3.ActiveState = "Incorrect"
>
>         End If
>
>
>Any other possible solutions? Thanks!

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