After you've got the basics of typing Logo commands to the Cricket, you'll want to put them together and give them a name in other words, defining a procedure. This is done in the Procedure window.
Run Button ^
repeat 3 [ab, onfor 5 rd]
Then, type runmotors into the Run This line, and click the Download button.
Now, when you click on the Cricket's Run Button, it will trigger your procedure. Congratulations you have written your first full Cricket program!