Hi,
In E-Prime 2: add mouse device, use “show cursor” in its properties. In the image, collect mouse clicks. After the image, try an inline:
debug.print "Pressed @ X: " & Mouse.CursorX & " Y: " & Mouse.CursorY & "."
Debug should now give you the coordinates. I would go from there.
I know people like this “hittest” thing, there’s an example (somewhere out there, perhaps in the example experiments? Certainly on this list) that is commonly used. Personally, I find it a lot of code for very little gain.
In E-Prime 3, you could perhaps use buttons (perhaps hidden buttons) to describe the features?
Best,
Michiel
--
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+u...@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/2cc06d8a-6df2-400d-b87a-13892f9592c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Tan,
Just log it in an attribute –
c.setattrib “CursorX”, Mouse.CursorX
c.setattrib “CursorY”, Mouse.CursorY
As for the collection of both keyboard and mouse click – perhaps you could just double the slide? Otherwise, you could use two slides, one after the other (with lengthy time limit, though not duration), one mouse, one keyboard, and keep checking whether both have responses; otherwise returning to a label just before the two slides.
--
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+u...@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/fe0883fb-37da-4b8d-a47a-05f956e15686%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Tan,
Well, the whole coordinate system is there: it is the Windows resolution. It’s a bit of a headache to figure out, but not too difficult. Mind that pixel 0 at Y is the top, not the bottom. So, let’s say the experiment runs at a resolution of 640 x 480. You have an imagedisplay, with both image width/height and actual image as a 100x100 pixels image. Let’s say it is centred.
Now, if CursorX = 0, it’s at the left of the image (border of display)
If CursorX = 320, it’s at the centre of the image
If CursorX = 270, it’s at the left side of the image.
If CursorY would be …. (480 / 2) + 50 = 290 … then the cursor is at the bottom edge of the image.
SO:
If CursorX >= 270 and CursorX < 370 then
If CursorY >= 190 and CursorY < 290 then debug.print “Hit”
End If
There you go. You can also do this region of interest thing with the HitTest trick, but personally I don’t really see the point. It’s more important that you know your stimulus material so well that you can figure out the regions. Of course, you could always do this sort of thing after the experiment as well.
--
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+u...@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/fe0883fb-37da-4b8d-a47a-05f956e15686%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+u...@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/8cc5f628-2f72-400d-bc57-9d4d9eeb7d36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.