After capturing a mouse click response you could immediately retrieve
the mouse position using a few lines of script:
dim ptMouse as Point
Mouse.GetCursorPos ptMouse.x, ptMouse.y
To determine if this point is inside the drawn circle you could use a
simple calculation: just calculate the (squared) distance between the
center of the circle and the hit point:
Const radius = 10
dim dx as long
dim dy as long
dx = ptMouse.x - center.x
dy = ptMouse.y - center.y
if (dx*dx + dy*dy)<=radius*radius then
... inside circle
else
... outside circle
end if
I'm not using a square root because it is computationally intensive
and not required because the comparison also holds for squared values.
cheers
paul
2011/10/3 Lucas Hutchison <lahu...@mtu.edu>:
> --
> You received this message because you are subscribed to the Google Groups "E-Prime" group.
> To post to this group, send email to e-p...@googlegroups.com.
> To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
>
>
Paul Groot nicely showed how to do this by using the mouse directly
instead of through an input mask. That is probably easier to do.
The method that you are working on instead uses a mouse input mask as
part of a stimulus object. That can offer some advantages, but is
much harder to use -- as you have seen, it requires wrestling with
the MouseResponseData collection. To get some idea, see the
"Response Areas for Mouse Input" and "Multiple Response Collection"
examples which you may download from the PST web site. You might
also look at the MouseResponseData topic and related topics in the
E-Basic Help facility.
-- David McFarlane, Professional Faultfinder