drawing lines using the mouse over experimenter-displayed images
Robert Gutzwiller
robert.gutzwiller at gmail.com
Fri Aug 30 20:29:10 UTC 2013
Hi all,
New to the in-depth programming of Eprime, and all I want to do is allow
participants to use the mouse to draw 3 lines visible on-screen over an
image that is presented. The basic idea would be to have them click on the
initiation point for the line, and then click where they want the line to
end.
I've tried to go through the help material and the forums, and cobbled
together this little bit of inline code that currently sits immediately
before my image. Can someone point me in the right direction for correcting
this?
Dim cnvs As Canvas
Set cnvs = Display.Canvas
Dim xPos, yPos, xPosTwo, yPosTwo As Integer
Dim counter As Integer
counter = 0
Mouse.ShowCursor True
Dim rdMouse1 As MouseResponseData
Dim mouseClicks As Integer
If counter < 3 Then
mouseClicks = Fixation.InputMasks.Item(1).Responses.Count
If mouseClicks > 0 Then
Set rdMouse1 =
CMouseResponseData(Fixation.InputMasks.Responses(1))
xPos = rdMouse1.CursorX
yPos = rdMouse1.CursorY
sleep 50
set rdMouse1 =
CMouseResponseData(Fixation.InputMasks.Responses(2))
xPosTwo = rdMouse1.CursorX
yPosTwo = rdMouse1.CursorY
END IF
cnvs.PenWidth = 30
cnvs.PenColor = CColor ("red")
cnvs.Line xPos, yPos, xPosTwo, yPosTwo
counter = counter + 1
END IF
Thanks!
-Robert
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/4464893c-ff01-4661-b5f6-7f617b37cc5a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20130830/6338bdfe/attachment.htm>
More information about the Eprime
mailing list