See what’s in this thread, you will find examples of commented scripts that will surely help you to get started: