Apple has an excellent online documentation library for AppleScript programming. This can be found at Introduction to AppleScript Language Guide.
Learning the LanguageEdit
Tip: If you can't find help for a problem from here, you can try searching with Google. For example, if you are searching information about how to use command repeat, write into the text field words "
" (without quotes). Usually there should be helpful page amongst the first ten results.