It's a scripting language. I don't know if there's such a thing as a simple tutorial. In this case I just used someone else's script because I'm too lazy to write my own code (I'd have to look up a lot of functionality I haven't used in literally years).