(Go back to Scripting )
Most standard Visual Basic functions are available in addition to those listed below. Avoid the "With... End With" statement, as it is not available in VBScript 4.0
Ask the user to enter a string (defaulting to "Default Value"), which is then returned in s.
Uses the VBScript engine to execute the piece of code entered in the string. This allows you to run code that can be changed depending on some paramenters – for example, you could call func.ChooseString with a different list of parameters by using execute to build the call.
You can format output to the combat log (in func.AddToCombatLog for example) by inserting the following RTF codes in this fashion:
\b1 Bold Text \b0
\u1 Underlined Text \u0
\i1 Italics Text \i0
\cf0 Black Text \cf0
\cf1 Red Text \cf0
\cf2 Blue Text \cf0
A new line will follow this text\par
Codes can be nested:
\cf2\b1\u1 Blue and Bold and Underlined Text \b0\u0\cf0
You must separate RTF codes from text, or it may cause the code to not work, or your following word to not display.
It is beyond the scope of this document to describe in detail the functions for manipulating strings. However, here are the most common ones and links to detailed explanations from this site:
http://www.devguru.com/Technologies/vbscript/quickref/vbscript_list.html
Mid : Extract inner part of a string
UCase and LCase : Make a string upper and lower case, respectively
Replace : Replace a string within a string
InStr and InStrRev : Search for a string within another string
Len : Length of a string
RegExp : Regular-expression string searching.
Trim : Remove blank spaces around a string
Split : Splits a string according to a separator string (for instance, the comma)