Navigation:  Scripting > System Scripts >

System Script Miscellaneous Functions

Previous pageReturn to chapter overviewNext page

vbld_AllMacros(): return the collection of all defined macros, including each macro with highest precedence for each macro with the same name defined for multiple macro types.

 

vbld_AppIsRunning(title, closeIt): Determine if an app with the given window title is running, and attempt to close if closeIt = True.

 

vbld_FindProcess(name): Look for processes with the given name (i.e., notepad.exe) and return their process IDs (one per line).

 

vbld_EscapeString(str): Double up characters that are treated specially by Visual Build.  Bracket characters [ ] and percent sign % characters are normally interpreted by Visual Build as referencing script code and macros within a field.  When a string or macro value will be used in a field, call this function from script code on the value to cause these special characters in a string to be treated as literals by Visual Build.

 

vbld_IIf(expression, truePart, falsePart): Returns one of two objects/values, depending on expression.

 

vbld_MSXML(): creates and returns a new MSXML parser object. MSXML v3 or later must be installed.

 

vbld_PadLeft(str, length, padChar): Pads a string on the left to the specified length with the specified pad character, returning the padded string.

 

vbld_QuoteStr(str): Properly quotes a string for passing as a command-line argument.

 

vbld_StepProp(propName, varType): Retrieves a step property value with all macros and script expanded and converted to the specified type (i.e., vbString/VT_BSTR [8], vbLong/VT_I4 [3], vbBoolean/VT_BOOL [11]).

 

vbld_TempMacros(): return the collection of temporary macros.

 

vbld_TempMacro(macroName): return the specified temporary macro.

 

vbld_TempMacroObj(macroName): return the object stored in the specified temporary macro.