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_CreateShare(path, shareName): Create a network disk share of the given name to the path specified on the local computer.

 

vbld_DeleteShare(shareName): Delete the given network disk share from the local computer if it exists.

 

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 VBP field, call this function from script code on the value to cause these special characters in a string to be treated as literals by VBP.

 

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

 

vbld_MSXML(): creates and returns a new MSXML parser object.  MSXML v3 or later must be installed.  Note: Available only in VBScript.

 

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_RemoteExecuteCmd(strServer, strCommand, strUserName, strPassword): Execute a command on a remote computer and return the exit code.

 

vbld_Sleep(milliseconds): Pause a script for the specified amount of time (use as an alternative to the Wait action to pause from within script code).

 

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(): return the object stored in the specified temporary macro.