Morys-Carter, W.L. & Vu, A. (2022, January 24). *tTraceTest8*[Computer software]. Pavlovia. https://gitlab.pavlovia.org/vespr/tTraceTest8
This version of the Trail Making Test (Reitan, 1955) uses code to create the targets and text, setting the target list from a spreadsheet, which increases flexibility compared with Andrew Vu's original version. It will also run on mobile devices, since it is entirely mouse-based.
Reitan, R. M. (1955). The relation of the Trail Making Test to organic brain damage. *Journal of Consulting Psychology*, 19(5), 393-394. https://doi.org/10.1037/h0044509.
<Paramname="Begin Experiment"updates="constant"val="# Maximum number of targets is the length of these two arrays&#10;# posArray1 contains the x coordinates and posArray2 the y coordinates&#10;posArray1 = [-0.05,-0.1,-0.15,-0.2,-0.25,-0.3,-0.35,-0.4,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4]&#10;posArray2 = [-0.05,-0.1,-0.15,-0.2,-0.25,-0.3,-0.35,-0.4,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4]&#10;&#10;# Set up target text and circles&#10;trialText = []&#10;trialTargets = []&#10;for Idx in range(len(posArray1)):&#10; trialText.append(visual.TextStim(win=win, &#10; name='trialText'+Idx,&#10; text=' ',&#10; font='Arial',&#10; pos=(posArray1[Idx], posArray2[Idx]), &#10; height=0.03, wrapWidth=None, ori=0, &#10; color=white))&#10; trialTargets.append(visual.Polygon(&#10; win=win,&#10; name="target",&#10; fillColor=white,&#10; lineColor=white,&#10; edges=36,&#10; pos=(posArray1[Idx], posArray2[Idx]), &#10; size=.05&#10; ))&#10;"valType="extendedCode"/>
<Paramname="Begin Experiment"updates="constant"val="# Maximum number of targets is the length of these two arrays&#10;# posArray1 contains the x coordinates and posArray2 the y coordinates&#10;posArray1 = [-0.05,-0.1,-0.15,-0.2,-0.25,-0.3,-0.35,-0.4,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4]&#10;posArray2 = [-0.05,-0.1,-0.15,-0.2,-0.25,-0.3,-0.35,-0.4,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4]&#10;&#10;# Set up target text and circles&#10;trialText = []&#10;trialTargets = []&#10;for Idx in range(len(posArray1)):&#10; trialText.append(visual.TextStim(win=win, &#10; name='trialText'+Idx,&#10; text=' ',&#10; font='Arial',&#10; pos=(posArray1[Idx], posArray2[Idx]), &#10; height=0.06, wrapWidth=None, ori=0, &#10; color=white))&#10; trialTargets.append(visual.Polygon(&#10; win=win,&#10; name="target",&#10; fillColor=white,&#10; lineColor=white,&#10; edges=36,&#10; pos=(posArray1[Idx], posArray2[Idx]), &#10; size=.1&#10; ))&#10;"valType="extendedCode"/>