Getting XY coordinates of stimuli in output

David McFarlane mcfarla9 at msu.edu
Mon Apr 2 18:32:22 UTC 2012


Sonya,

Two parts to this question:

1) How to compute pixel coordinates from % coordinates?
2) How to log these coordinates in the .edat file?

As for #1, you may translate % coordinates to pixel coordinates 
through use of Display.XRes and Display.YRes (see those topics in the 
E-Basic Help facility).  E.g., if the X coordinate of a text box is 
20%, then its pixel coordinate is

     Display.XRes * 20/1000

(One high-performance hint for aspiring E-Basic/VBA experts:  If you 
will make many calls to Display.XRes/.Res, store these values to a 
variables in order to reduce overhead from repeated object access.)

As for #2, merely use c.SetAttrib to add the value to the log, e.g.,

     c.SetAttrib "Text1.X", Display.XRes * 20/1000

See the Context topic in the E-Basic Help.  You may also ask for help 
from PST's trained staff at 
http://support.pstnet.com/e%2Dprime/support/login.asp , they strive 
to respond to all requests in 24-48 hours.

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


At 4/2/2012 09:51 AM Monday, you wrote:
>I have a quick question concerning the exact placement of stimuli.  I
>am using a Tobii eye tracker in conjunction with E-prime and I have 9
>AOIs specified in my script via text boxes.  My question is, I
>currently have the position of my AOIs specified by relative figures
>(i.e. percentages) so that it can accommodate multiple resolutions
>(which is important), but I also need the exact XY coordinates of each
>AOI for data processing.  Is there a way to have the coordinates
>output into a text file, an E-prime proprietary file, or a user
>defined column of my gazedata file? I know you can compute the
>coordinates, but I would rather have them output automatically in
>order to combat user error since other experimenters will be using
>this script.
>
>Thanks!
>-Sonya

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