There are a myriad of books and web sites dedicated to helping you learn good practices and techniques for script programming. The resources you choose to help you learn are largely a function of the scripting language you are using and the platform from which you operate. Rather than attempt to list all these resources in this space, Mentor Graphics recommends that you search the internet for an extensive list of the many resources available.
Note that many automation programmers that use the Windows platform rely on the Windows Script Documentation available from the Microsoft web site. There is online help at that site, available for download.