This following articles introduce some fundamental information about writing script in E-Basic.
SCRIPTING: Introducing E-Basic 
SCRIPTING: Logical Operators 
SCRIPTING: Flow Control 
SCRIPTING: Examples and Exercises 
More advanced information concerning programming may be found in SCRIPTING: Programming: Intermediate  and SCRIPTING: Programming: Advanced .
NOTE: Detailed information concerning scripting in E-Basic can be found in the E-Prime Command Reference (https://pstnet.com/ecr).
Lastly, the E-Prime 2.0 Introduction to Scripting Webinar contains information on getting started with scripting in E-Basic. Materials for the webinar are attached to this article.
OVERVIEW: Extending Experiments with Script