' For each new piece of user defined data that you add you must perform the following steps. ' 1. Add a new member to the end of the UserEyeGazeData data structure defined below. ' 2. Edit the script in the UserWriteGazeDataFile subroutine to append a tab character and ' new column label to the section that writes out the column labels. ' 3. Edit the script in the UserWriteGazeDataFile subroutine to append a tab character and ' the current value of the new variable. ' ' Type UserEyeGazeData data structure is used to keep track of information specific to E-Prime conditional ' data per eye gaze observation. You may use it to help you to track and log any additional ' experiment related data that you need to associate with the gaze data. Type UserEyeGazeData TrialId As String Prime As String AOI1 As String AOI2 As String AOI As String AOIStimulus As String CRESP As String RESP As String ACC As String RT As Long CurrentObject As String ' 1. Declare additional User Defined values here as needed End Type ' Write a line of tab delimited data to the user defined gaze data file. Sub UserWriteGazeDataFile( c As Context, theGazeData As TobiiEyeTrackerResponseData, theUserEyeGazeData As UserEyeGazeData ) Dim strOut As String ' Need to have a valid data structure. Debug.Assert Not theGazeData Is Nothing ' If this is the first call to the file since it was opened then write ' the column headers If TET_GetGazeDataFileLineNumber() = 0 Then ' Common prefix Dim strDelimitTextPart1 As String strDelimitTextPart1 = DelimitText(ebTab, _ "Subject", _ "Session", _ "ID") ' Append standard data from TET Dim strDelimitTextPart2 As String strDelimitTextPart2 = DelimitText(ebTab, _ "RTTime", _ "RTTimeReceived", _ "CursorX", _ "CursorY", _ "HardwareTimestamp", _ "HostTimestamp", _ "SystemTimestamp", _ "SEQ", _ "SEQH", _ "SEQD") ' Append standard data from TET Dim strDelimitTextPart3 As String strDelimitTextPart3 = DelimitText(ebTab, _ "GazePointValidityLeftEye", _ "GazePointPositionDisplayXLeftEye", _ "GazePointPositionDisplayYLeftEye", _ "GazePointValidityRightEye", _ "GazePointPositionDisplayXRightEye", _ "GazePointPositionDisplayYRightEye", _ "GazePointPositionUserXLeftEye", _ "GazePointPositionUserYLeftEye", _ "GazePointPositionUserZLeftEye", _ "GazePointPositionUserXRightEye", _ "GazePointPositionUserYRightEye", _ "GazePointPositionUserZRightEye", _ "GazeOriginValidityLeftEye", _ "GazeOriginPositionUserXLeftEye", _ "GazeOriginPositionUserYLeftEye", _ "GazeOriginPositionUserZLeftEye", _ "GazeOriginValidityRightEye", _ "GazeOriginPositionUserXRightEye", _ "GazeOriginPositionUserYRightEye", _ "GazeOriginPositionUserZRightEye", _ "GazeOriginPositionTrackBoxXLeftEye", _ "GazeOriginPositionTrackBoxYLeftEye", _ "GazeOriginPositionTrackBoxZLeftEye", _ "GazeOriginPositionTrackBoxXRightEye", _ "GazeOriginPositionTrackBoxYRightEye", _ "GazeOriginPositionTrackBoxZRightEye") ' Create columns to append additional user defined data Dim strDelimitTextPart4 As String strDelimitTextPart4 = DelimitText(ebTab, _ "TrialId", _ "Prime", _ "AOI1", _ "AOI2", _ "AOI", _ "AOIStimulus", _ "CRESP", _ "RESP", _ "ACC", _ "RT", _ "CurrentObject") ' 2. Declare additional column labels for User Defined columns here as needed strOut = strDelimitTextPart1 & ebTab & strDelimitTextPart2 & ebTab & strDelimitTextPart3 & ebTab & strDelimitTextPart4 ' Write the line to the file TET_WriteGazeDataFile c, strOut End If ' Write the new line of data values to the file ' Common prefix Dim strDelimitTextPart5 As String strDelimitTextPart5 = DelimitText(ebTab, _ c.GetAttrib( "Subject" ), _ c.GetAttrib( "Session" ), _ TET_GetGazeDataFileLineNumber()) ' Append standard data from TET Dim strDelimitTextPart6 As String strDelimitTextPart6 = DelimitText(ebTab, _ theGazeData.RTTime, _ theGazeData.RTTimeReceived, _ theGazeData.CursorX, _ theGazeData.CursorY, _ theGazeData.HardwareTimestamp.ToString(), _ theGazeData.HostTimestamp.ToString(), _ theGazeData.SystemTimestamp.ToString(), _ theGazeData.SEQ, _ theGazeData.SEQH, _ theGazeData.SEQD) ' Append standard data from TET Dim strDelimitTextPart7 As String strDelimitTextPart7 = DelimitText(ebTab, _ theGazeData.GazePointValidityLeftEye, _ theGazeData.GazePointPositionDisplayXLeftEye, _ theGazeData.GazePointPositionDisplayYLeftEye, _ theGazeData.GazePointValidityRightEye, _ theGazeData.GazePointPositionDisplayXRightEye, _ theGazeData.GazePointPositionDisplayYRightEye, _ theGazeData.GazePointPositionUserXLeftEye, _ theGazeData.GazePointPositionUserYLeftEye, _ theGazeData.GazePointPositionUserZLeftEye, _ theGazeData.GazePointPositionUserXRightEye, _ theGazeData.GazePointPositionUserYRightEye, _ theGazeData.GazePointPositionUserZRightEye, _ theGazeData.GazeOriginValidityLeftEye, _ theGazeData.GazeOriginPositionUserXLeftEye, _ theGazeData.GazeOriginPositionUserYLeftEye, _ theGazeData.GazeOriginPositionUserZLeftEye, _ theGazeData.GazeOriginValidityRightEye, _ theGazeData.GazeOriginPositionUserXRightEye, _ theGazeData.GazeOriginPositionUserYRightEye, _ theGazeData.GazeOriginPositionUserZRightEye, _ theGazeData.GazeOriginPositionTrackBoxXLeftEye, _ theGazeData.GazeOriginPositionTrackBoxYLeftEye, _ theGazeData.GazeOriginPositionTrackBoxZLeftEye, _ theGazeData.GazeOriginPositionTrackBoxXRightEye, _ theGazeData.GazeOriginPositionTrackBoxYRightEye, _ theGazeData.GazeOriginPositionTrackBoxZRightEye) ' Append eye tracking data to user defined columns ' This part of the script works in conjunction with the SaveGazeData InLine to populate ' the cells of the GazeData file. ' NOTE: User defined columns may be empty if there was not a valid observation Dim strDelimitTextPart8 As String strDelimitTextPart8 = DelimitText(ebTab, _ theUserEyeGazeData.TrialId, _ theUserEyeGazeData.Prime, _ theUserEyeGazeData.AOI1, _ theUserEyeGazeData.AOI2, _ theUserEyeGazeData.AOI, _ theUserEyeGazeData.AOIStimulus, _ theUserEyeGazeData.CRESP, _ theUserEyeGazeData.RESP, _ theUserEyeGazeData.ACC, _ theUserEyeGazeData.RT, _ theUserEyeGazeData.CurrentObject) ' 3. Declare additional User Defined values here as needed strOut = strDelimitTextPart5 & ebTab & strDelimitTextPart6 & ebTab & strDelimitTextPart7 & ebTab & strDelimitTextPart8 ' Write the line to the file TET_WriteGazeDataFile c, strOut End Sub