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 within the 'User Script' window (ALT+7) 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 the 'TrialProc' procedure four 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' object, 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.