I had pretty close to zero experience with Prontoscript ( javascript ) when I first tried. But it it took a long time before I could write my first script. If you are going to try to write a script get " Javascript The Definitive Guide " ( fifth edition ) by Flanagan. Also check out W3 Schools
http://www.w3schools.com/ online, it is free and a great way to practice writing scripts as you learn. You might want to read about HTML first . There is plenty of information online about javascript and examples of how and why it works. But most 99% of it concerns it being used in a web page like the one your reading right now. Be sure to download the Prontoscript Developers Guide.This has examples on the very basics to the more advanced options.
My guess is that it will take you at least 3 to 12 months before you get something that works for you. It all depends how much time you can spend learning a new language. Since you have a goal to achieve it makes learning easier.