What do you need to write and run scripts for InDesign? The following things:
The standard scripting system for your computer (if you plan to use the platform-specific scripting languages rather than JavaScript)
The InDesign scripting documentation and example scripts
A good understanding of the way InDesign works
Confidence