Determine the Purpose and Placement of the Script
The user must consider what task the script is supposed to accomplish and when the action must occur. For example, an experimenter might want to choose a random number from 1-499 to be used as the stimulus display for each trial. The purpose of the script, therefore, is to select a random number and to place the selected value into a form usable by E-Prime.
The placement of the script must be within the Procedure driving the events of the trial. Specifically, since the random number is to be used during the display of the stimulus, the script determining the value must be entered in the trial Procedure prior to the object displaying the stimulus.