Our schematics capturing tool (PADS Designer) offers the possibility to "automate" several processteps using VBScripts. For example, you can create a PDF either by opening the relevant GUI (3 clicks), enter some additional inforamtion (3 to 5 clicks and some typing) or by running a script (2 clicks). This script include every information we genearlly entered in the GUI. So I went for the scripting option.
In the meantime, I created a set of scripts, helping my colleagues and me to save time. Just recently I reviewed my code with a more experienced colleague (no vbs-experience, or knowled regarding the schematics tool, though), who suggested, I could unify my function calls and names of variables and so on. For example, most of my scripts need file-system-objects, or objects related to the schematics tool; furthermore there's some functions I repeatedly use. Those functions and objects appear in each script file, regardless wether or not I use them. So, the scripts got longer and longer with each new script.
My scripts are written using Notepad++, as
- the schematics tool offers no "integrated" scritping environment,
- I don't use Visual Studio (or some other tool) and
- it worked with little effort regarding setup for me.
Now I wonder, if it's possible to add some kind of "header" file that I can include in each vbs-file. this "header" should contain
- functions I use in more than one script,
- declaration of global variable and constants.
Can this be done, and how?