|
Scripting in Visual Build Pro |
Top Previous Next |
|
Windows Script integration is a powerful feature that can be used throughout your Visual Build Pro projects. Any script language registering itself as an Active Script host engine can be used within Visual Build Pro. VBScript and Jscript are provided by Microsoft, but other companies have created script engines for PerlScript, Python, RubyScript, etc. Please contact the vendor of the script engine for details on installing and registering the language for Active Script use.
Script code can be used for complex build rules, accessing common objects such as the Visual Build Pro object model, FileSystemObject, Dictionary, WshShell, and MSXML within a project, creating and using custom COM objects that you have created, and more.
Script code can be entered in multiple ways:
Before a script code fragment, expression, or event is executed, all the script code defined in the Script Editor for that language is added to the engine. The Visual Build Pro Application, Project, Step, and Builder automation objects are also added as named items (the Builder object is only available when building).
Unlike macros, where macros of the same name can override another based on their precedence, all the script code (Temporary, Project, Global, and System) for a language is concatenated together and added as global items that are accessible to all script code.
Script code can also create other COM objects that are available, etc. Several predefined system scripts are provided. See the Script.bld sample for ideas on the use of script within projects.
Notes on Debugging Scripts
|