This experiment illustrates using a Summation object to measure accuracy over trials and provide overall accuracy at the end of the block.
A Summation object is declared on the User tab of the Script window, to enable the collection of a number of data entries. The InLine object, InitiateVar, initiates the Summation object,
OverallAcc, for use.
Instructions are given, followed by a List object, TrialList. The List runs procedure TrialProc 4 times by manipulating the value of the Weight attribute. Each level is run twice.
The user sees a brief fixation cross, followed by a stimulus of the letter X or Y. The user is to respond by pressing a corresponding number.
Following the StimulusPresentation, the InLine object, Summation, adds the accuracy of the user's response to the Summation object. In addition, a Debug.Print command is used to print the user's running accuracy in the Output window. The mean value of the Summation object is then placed in the Trial Level attribute of the same name.