A script for Adobe is a file that contains commands for a program: Illustrator or InDesign.
Most often, scripts are used in the case of repeated repetition of operations - in a routine. If some repeatable process can be described by logical actions, then this is a good reason to contact the developer to make your life easier and free from the routine.
Another important possibility for using scripts is the generation of a large number of objects based on data and layouts. With this approach, the error of transferring data to the layout is eliminated, since such operations are usually performed without loss.
The easiest way to run a script in Illustrator or InDesign is to drag the script file directly into the program window.
Another script can be run through the menu (⌘F12):