From 9f7e1e0da4b9f7a3adb614edd9078f8f4ebc87f2 Mon Sep 17 00:00:00 2001 From: "Jon D." Date: Wed, 9 Jul 2025 16:01:30 -0500 Subject: [PATCH 1/3] Updated XMLDoc and comments for Keywords, Operators, GlobalDefs and ObjectDefs per #21. --- GlobalDefs.vbs | 451 +++++++++++++++++++++++++++------ ObjectDefs.vbs | 413 +++++++++++++++++++++++++++--- src/definitions/keywords.json | 68 ++--- src/definitions/operators.json | 2 +- 4 files changed, 796 insertions(+), 138 deletions(-) diff --git a/GlobalDefs.vbs b/GlobalDefs.vbs index 3154dea..6c8b22f 100644 --- a/GlobalDefs.vbs +++ b/GlobalDefs.vbs @@ -14,63 +14,97 @@ Function Asc(char) End Function ''' Returns the ANSI character code corresponding to the first letter in a string. +''' The character to get the ANSI code for. Function AscB(char) End Function ''' Function that returns the Unicode (wide) character code that represents a specific Unicode character. +''' The Unicode character to get the code for. Function AscW(char) End Function ''' Returns the arctangent of a number. +''' Any valid numeric expression. Function Atn(number) End Function ''' Returns an expression that has been converted to a Variant of subtype Boolean. +''' Any valid expression. Function CBool(expr) ' As Boolean End Function +''' Returns an expression that has been converted to a Variant of subtype Byte. +''' Any valid expression. Function CByte(expr) ' As Byte End Function +''' Returns an expression that has been converted to a Variant of subtype Currency. +''' Any valid string expression or numeric expression that can be converted to a currency value. Function CCur(expr) ' As Currency End Function +''' Converts an expression to a Date subtype. +''' Any valid expression that can be interpreted as a date. Function CDate(expr) ' As Date End Function +''' Converts an expression to a Double subtype. +''' Any valid numeric expression. Function CDbl(expr) ' As Double End Function +''' Returns the character associated with the specified ANSI character code. +''' A number that identifies a character. Function Chr(charcode) End Function +''' Returns a string containing the byte associated with the specified character code. +''' A number that identifies a character. Function ChrB(charcode) End Function +''' Returns the Unicode character associated with the specified character code. +''' A number that identifies a Unicode character. Function ChrW(charcode) End Function +''' Converts an expression to an Integer subtype. +''' Any valid numeric expression. Function CInt(expr) ' As Integer End Function +''' Converts an expression to a Long subtype. +''' Any valid numeric expression. Function CLng(expr) ' As Long End Function +''' Returns the cosine of an angle. +''' Any valid numeric expression that expresses an angle in radians. Function Cos(number) End Function +''' Creates and returns a reference to an Automation object. +''' The application name and class of the object to create. Function CreateObject(classname) End Function +''' Creates and returns a reference to an Automation object on a remote server. +''' The application name and class of the object to create. +''' The name of the network server where the object is to be created. Function CreateObject(classname, location) End Function +''' Converts an expression to a Single subtype. +''' Any valid numeric expression. Function CSng(expr) ' As Single End Function +''' Converts an expression to a String subtype. +''' Any valid expression. Function CStr(expr) ' As String End Function +''' Returns the current system date. Function Date() End Function @@ -128,26 +162,33 @@ End Function ''' Returns a Variant of subtype Date for a specified year, month, and day. ''' Number between 100 and 9999, inclusive, or a numeric expression. +''' A number representing the month. +''' A number representing the day. Function DateSerial(year, month, day) End Function ''' Returns a Variant of subtype Date. +''' String expression representing a date. Function DateValue(date) End Function ''' Returns a whole number between 1 and 31, inclusive, representing the day of the month. +''' Any expression that can represent a date. Function Day(date) End Function -''' Returns +''' Returns a string with certain characters replaced with escape sequences. +''' String to be escaped. Function Escape(str) ' As String End Function ''' Evaluates an expression and returns the result. +''' String expression containing any valid VBScript expression. Function Eval(expr) End Function ''' Returns e (the base of natural logarithms) raised to a power. +''' Any valid numeric expression. Function Exp(number) End Function @@ -172,6 +213,8 @@ End Function Function Filter(InputStrings, Value, Include, Compare) End Function +''' Returns the integer portion of a number. +''' Any valid numeric expression. Function Fix(number) End Function @@ -216,81 +259,153 @@ End Function Function FormatDateTime(Date, NamedFormat) ' As String End Function +''' Returns an expression formatted as a number. +''' Expression to be formatted. Function FormatNumber(Expression) ' As String End Function +''' Returns an expression formatted as a number. +''' Expression to be formatted. +''' Numeric value indicating how many places to the right of the decimal are displayed. Function FormatNumber(Expression, NumDigitsAfterDecimal) ' As String End Function +''' Returns an expression formatted as a number. +''' Expression to be formatted. +''' Numeric value indicating how many places to the right of the decimal are displayed. +''' Tristate constant that indicates whether or not a leading zero is displayed for fractional values. Function FormatNumber(Expression, NumDigitsAfterDecimal, IncludeLeadingDigit) ' As String End Function +''' Returns an expression formatted as a number. +''' Expression to be formatted. +''' Numeric value indicating how many places to the right of the decimal are displayed. +''' Tristate constant that indicates whether or not a leading zero is displayed for fractional values. +''' Tristate constant that indicates whether or not to place negative values within parentheses. Function FormatNumber(Expression, NumDigitsAfterDecimal, IncludeLeadingDigit, UseParensForNegativeNumbers) ' As String End Function +''' Returns an expression formatted as a number. +''' Expression to be formatted. +''' Numeric value indicating how many places to the right of the decimal are displayed. +''' Tristate constant that indicates whether or not a leading zero is displayed for fractional values. +''' Tristate constant that indicates whether or not to place negative values within parentheses. +''' Tristate constant that indicates whether or not numbers are grouped using the group delimiter. Function FormatNumber(Expression, NumDigitsAfterDecimal, IncludeLeadingDigit, UseParensForNegativeNumbers, GroupDigits) ' As String End Function +''' Returns an expression formatted as a percentage (multiplied by 100) with a trailing % character. +''' Expression to be formatted. Function FormatPercent(Expression) ' As String End Function +''' Returns an expression formatted as a percentage (multiplied by 100) with a trailing % character. +''' Expression to be formatted. +''' Numeric value indicating how many places to the right of the decimal are displayed. Function FormatPercent(Expression, NumDigitsAfterDecimal) ' As String End Function +''' Returns an expression formatted as a percentage (multiplied by 100) with a trailing % character. +''' Expression to be formatted. +''' Numeric value indicating how many places to the right of the decimal are displayed. +''' Tristate constant that indicates whether or not a leading zero is displayed for fractional values. Function FormatPercent(Expression, NumDigitsAfterDecimal, IncludeLeadingDigit) ' As String End Function +''' Returns an expression formatted as a percentage (multiplied by 100) with a trailing % character. +''' Expression to be formatted. +''' Numeric value indicating how many places to the right of the decimal are displayed. +''' Tristate constant that indicates whether or not a leading zero is displayed for fractional values. +''' Tristate constant that indicates whether or not to place negative values within parentheses. Function FormatPercent(Expression, NumDigitsAfterDecimal, IncludeLeadingDigit, UseParensForNegativeNumbers) ' As String End Function +''' Returns an expression formatted as a percentage (multiplied by 100) with a trailing % character. +''' Expression to be formatted. +''' Numeric value indicating how many places to the right of the decimal are displayed. +''' Tristate constant that indicates whether or not a leading zero is displayed for fractional values. +''' Tristate constant that indicates whether or not to place negative values within parentheses. +''' Tristate constant that indicates whether or not numbers are grouped using the group delimiter. Function FormatPercent(Expression, NumDigitsAfterDecimal, IncludeLeadingDigit, UseParensForNegativeNumbers, GroupDigits) ' As String End Function +''' Returns the current locale identifier for the system. Function GetLocale() ' As Long End Function -''' ? +''' Returns an Automation object from a file. +''' Full path and name of the file containing the object to retrieve. Function GetObject(pathname) ' As Object End Function -''' ? +''' Returns an Automation object from a file. +''' Full path and name of the file containing the object to retrieve. +''' String representing the class of the object. Function GetObject(pathname, classname) ' As Object End Function +''' Returns a reference to a procedure. +''' The name of the procedure. Function GetRef(procname) End Function +''' Returns the locale identifier for the language used by the host application. Function GetUILanguage() ' As Integer End Function +''' Returns a string representing the hexadecimal value of a number. +''' Any valid numeric expression. Function Hex(number) ' As String End Function ''' Returns a whole number between 0 and 23, inclusive, representing the hour of the day. +''' Any expression that can represent a time. Function Hour(time) ' As Integer End Function ''' Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns the contents of the text box. +''' String expression displayed as the message in the dialog box. Function InputBox(prompt) End Function ''' Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns the contents of the text box. +''' String expression displayed as the message in the dialog box. +''' String expression displayed in the title bar of the dialog box. Function InputBox(prompt, title) End Function ''' Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns the contents of the text box. +''' String expression displayed as the message in the dialog box. +''' String expression displayed in the title bar of the dialog box. +''' String expression displayed in the text box as the default response. Function InputBox(prompt, title, default) End Function ''' Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns the contents of the text box. +''' String expression displayed as the message in the dialog box. +''' String expression displayed in the title bar of the dialog box. +''' String expression displayed in the text box as the default response. +''' Numeric expression that specifies the horizontal distance of the left edge of the dialog box from the left edge of the screen. Function InputBox(prompt, title, default, xpos) End Function ''' Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns the contents of the text box. +''' String expression displayed as the message in the dialog box. +''' String expression displayed in the title bar of the dialog box. +''' String expression displayed in the text box as the default response. +''' Numeric expression that specifies the horizontal distance of the left edge of the dialog box from the left edge of the screen. +''' Numeric expression that specifies the vertical distance of the upper edge of the dialog box from the top of the screen. Function InputBox(prompt, title, default, xpos, ypos) End Function ''' Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns the contents of the text box. +''' String expression displayed as the message in the dialog box. +''' String expression displayed in the title bar of the dialog box. +''' String expression displayed in the text box as the default response. +''' Numeric expression that specifies the horizontal distance of the left edge of the dialog box from the left edge of the screen. +''' Numeric expression that specifies the vertical distance of the upper edge of the dialog box from the top of the screen. +''' String expression that identifies the Help file to use to provide context-sensitive Help for the dialog box. +''' Numeric expression that identifies the Help context number assigned by the Help author to the appropriate Help topic. Function InputBox(prompt, title, default, xpos, ypos, helpfile, context) End Function @@ -322,117 +437,195 @@ End Function Function InStr(start, string1, string2, compare) ' As Long End Function -''' Returns the position of the first occurrence of one string within another. +''' Returns the byte position of the first occurrence of one string within another. +''' The string to be searched. +''' The string expression to search for. Function InStrB(string1, string2) ' As Long End Function -''' Returns the position of the first occurrence of one string within another. +''' Returns the byte position of the first occurrence of one string within another. +''' Specifies the starting position for search. +''' The string to be searched. +''' The string expression to search for. Function InStrB(start, string1, string2) ' As Long End Function -''' Returns the position of the first occurrence of one string within another. +''' Returns the byte position of the first occurrence of one string within another. +''' The string to be searched. +''' The string expression to search for. +''' Specifies the string comparison to use. Function InStrB(string1, string2, compare) ' As Long End Function -''' Returns the position of the first occurrence of one string within another. +''' Returns the byte position of the first occurrence of one string within another. +''' Specifies the starting position for search. +''' The string to be searched. +''' The string expression to search for. +''' Specifies the string comparison to use. Function InStrB(start, string1, string2, compare) ' As Long End Function ''' Returns the position of an occurrence of one string within another, from the end of string. +''' The string to be searched. +''' The string expression to search for. Function InStrRev(string1, string2) ' As Long End Function ''' Returns the position of an occurrence of one string within another, from the end of string. +''' The string to be searched. +''' The string expression to search for. +''' Specifies the starting position for search from the end. Function InStrRev(string1, string2, start) ' As Long End Function ''' Returns the position of an occurrence of one string within another, from the end of string. +''' The string to be searched. +''' The string expression to search for. +''' Specifies the starting position for search from the end. +''' Specifies the string comparison to use. Function InStrRev(string1, string2, start, compare) ' As Long End Function +''' Returns the integer portion of a number. +''' Any valid numeric expression. Function Int(number) End Function +''' Returns a Boolean value indicating whether a variable is an array. +''' Variable to test. Function IsArray(var) ' As Boolean End Function +''' Returns a Boolean value indicating whether an expression can be converted to a date. +''' Any variable or expression. Function IsDate(expr) ' As Boolean End Function +''' Returns a Boolean value indicating whether a variable has been initialized. +''' A variable or expression. Function IsEmpty(expr) ' As Boolean End Function +''' Returns a Boolean value indicating whether an expression contains no valid data (Null). +''' Any variable or expression. Function IsNull(expr) ' As Boolean End Function ''' Returns a Boolean value indicating whether an expression can be evaluated as a number. +''' Any variable or expression. Function IsNumeric(expr) ' As Boolean End Function +''' Returns a Boolean value indicating whether an expression references a valid Automation object. +''' Any variable or expression. Function IsObject(expr) ' As Boolean End Function ''' Returns a string created by joining a number of substrings contained in an array. +''' One-dimensional array containing substrings to be joined. Function Join(list) ' As String End Function ''' Returns a string created by joining a number of substrings contained in an array. +''' One-dimensional array containing substrings to be joined. +''' String character used to separate the substrings in the returned string. Function Join(list, delimiter) ' As String End Function +''' Returns the smallest available subscript for the indicated dimension of an array. +''' Name of the array variable. Function LBound(arrayname) End Function +''' Returns the smallest available subscript for the indicated dimension of an array. +''' Name of the array variable. +''' Whole number indicating which dimension's lower bound is returned. Function LBound(arrayname, dimension) End Function +''' Returns a string that has been converted to lowercase. +''' String expression to be converted. Function LCase(str) ' As String End Function +''' Returns a specified number of characters from the left side of a string. +''' String expression from which the leftmost characters are returned. +''' Numeric expression indicating how many characters to return. Function Left(str, length) ' As String End Function +''' Returns a specified number of bytes from the left side of a string. +''' String expression from which the leftmost bytes are returned. +''' Numeric expression indicating how many bytes to return. Function LeftB(str, length) ' As String End Function ''' Returns the number of characters in a string or the number of bytes required to store a variable. +''' Any valid string expression or variable name. Function Len(str) ' As Long End Function +''' Returns the number of bytes required to store a string. +''' Any valid string expression. Function LenB(str) ' As Long End Function +''' Returns a picture object. +''' String expression that indicates the name of the picture file to be loaded. Function LoadPicture(picturename) End Function +''' Returns the natural logarithm of a number. +''' Any valid numeric expression greater than 0. Function Log(number) End Function +''' Returns a string without leading spaces. +''' String expression from which leading spaces are removed. Function LTrim(str) ' As String End Function ''' Returns a specified number of characters from a string. +''' String expression from which characters are returned. +''' Character position in string at which the part to be taken begins. Function Mid(str, start) ' As String End Function ''' Returns a specified number of characters from a string. +''' String expression from which characters are returned. +''' Character position in string at which the part to be taken begins. +''' Number of characters to return. Function Mid(str, start, length) ' As String End Function -''' Returns a specified number of characters from a string. +''' Returns a specified number of bytes from a string. +''' String expression from which bytes are returned. +''' Byte position in string at which the part to be taken begins. Function MidB(str, start) ' As String End Function -''' Returns a specified number of characters from a string. +''' Returns a specified number of bytes from a string. +''' String expression from which bytes are returned. +''' Byte position in string at which the part to be taken begins. +''' Number of bytes to return. Function MidB(str, start, length) ' As String End Function +''' Returns a whole number between 0 and 59, inclusive, representing the minute of the hour. +''' Any expression that can represent a time. Function Minute(time) ' As Integer End Function +''' Returns a whole number between 1 and 12, inclusive, representing the month of the year. +''' Any expression that can represent a date. Function Month(date) ' As Integer End Function +''' Returns a string indicating the specified month. +''' Numeric designation for a month. Function MonthName(date) ' As String End Function +''' Returns a string indicating the specified month. +''' Numeric designation for a month. +''' Boolean value that indicates if the month name is to be abbreviated. Function MonthName(date, abbrevation) ' As String End Function @@ -467,150 +660,261 @@ End Function Function Now ' As Date End Function +''' Returns a string representing the octal value of a number. +''' Any valid numeric expression. Function Oct(number) ' As String End Function ''' Returns a string in which a specified substring has been replaced with another substring. +''' String expression containing substring to replace. +''' Substring being searched for. +''' Replacement substring. Function Replace(str, find, replacewith) ' As String End Function ''' Returns a string in which a specified substring has been replaced with another substring. +''' String expression containing substring to replace. +''' Substring being searched for. +''' Replacement substring. +''' Position within string where substring search is to begin. Function Replace(str, find, replacewith, start) ' As String End Function ''' Returns a string in which a specified substring has been replaced with another substring a specified number of times. +''' String expression containing substring to replace. +''' Substring being searched for. +''' Replacement substring. +''' Position within string where substring search is to begin. +''' Number of substring substitutions to perform. Function Replace(str, find, replacewith, start, count) ' As String End Function ''' Returns a string in which a specified substring has been replaced with another substring a specified number of times. +''' String expression containing substring to replace. +''' Substring being searched for. +''' Replacement substring. +''' Position within string where substring search is to begin. +''' Number of substring substitutions to perform. +''' Numeric value indicating the kind of comparison to use when evaluating substrings. Function Replace(str, find, replacewith, start, count, compare) ' As String End Function ''' Returns a whole number representing an RGB color value. +''' Number in the range 0-255, inclusive, that represents the red component of the color. +''' Number in the range 0-255, inclusive, that represents the green component of the color. +''' Number in the range 0-255, inclusive, that represents the blue component of the color. Function RGB(red, green, blue) ' As Long End Function +''' Returns a specified number of characters from the right side of a string. +''' String expression from which the rightmost characters are returned. +''' Numeric expression indicating how many characters to return. Function Right(str, length) ' As String End Function +''' Returns a specified number of bytes from the right side of a string. +''' String expression from which the rightmost bytes are returned. +''' Numeric expression indicating how many bytes to return. Function RightB(str, length) ' As String End Function +''' Returns a random number. Function Rnd() End Function +''' Returns a random number. +''' Any valid numeric expression. Function Rnd(number) End Function +''' Returns a number rounded to a specified number of decimal places. +''' Any valid numeric expression. +''' Number indicating how many places to the right of the decimal are included in the rounding. Function Round(number, digits) End Function +''' Returns a string without trailing spaces. +''' String expression from which trailing spaces are removed. Function RTrim(str) ' As String End Function +''' Returns a string identifying the script engine in use. Function ScriptEngine ' As String End Function +''' Returns the build version number of the script engine in use. Function ScriptEngineBuildVersion ' As String End Function +''' Returns the major version number of the script engine in use. Function ScriptEngineMajorVersion ' As String End Function +''' Returns the minor version number of the script engine in use. Function ScriptEngineMinorVersion ' As String End Function +''' Returns a whole number between 0 and 59, inclusive, representing the second of the minute. +''' Any expression that can represent a time. Function Second(time) End Function -''' undocumented +''' Sets the global locale and returns the previous locale. +''' Locale identifier. Function SetLocale(int) End Function +''' Returns an integer indicating the sign of a number. +''' Any valid numeric expression. Function Sgn(number) End Function +''' Returns the sine of an angle. +''' Any valid numeric expression that expresses an angle in radians. Function Sin(number) End Function +''' Returns a string consisting of the specified number of spaces. +''' Number of spaces you want in the string. Function Space(number) ' As String End Function +''' Returns a zero-based, one-dimensional array containing a specified number of substrings. +''' String expression containing substrings and delimiters. Function Split(str) End Function +''' Returns a zero-based, one-dimensional array containing a specified number of substrings. +''' String expression containing substrings and delimiters. +''' String character used to identify substring limits. Function Split(str, delimiter) End Function +''' Returns a zero-based, one-dimensional array containing a specified number of substrings. +''' String expression containing substrings and delimiters. +''' String character used to identify substring limits. +''' Number of substrings to be returned. Function Split(str, delimiter, count) End Function +''' Returns a zero-based, one-dimensional array containing a specified number of substrings. +''' String expression containing substrings and delimiters. +''' String character used to identify substring limits. +''' Number of substrings to be returned. +''' Numeric value indicating the kind of comparison to use when evaluating substrings. Function Split(str, delimiter, count, compare) End Function +''' Returns the square root of a number. +''' Any valid numeric expression greater than or equal to 0. Function Sqr(number) End Function +''' Returns a value indicating the result of a string comparison. +''' Any valid string expression. +''' Any valid string expression. Function StrComp(string1, string2) End Function +''' Returns a value indicating the result of a string comparison. +''' Any valid string expression. +''' Any valid string expression. +''' Numeric value indicating the kind of comparison to use when evaluating the strings. Function StrComp(string1, string2, compare) End Function +''' Returns a string with characters in reverse order. +''' String whose characters are to be reversed. Function StrReverse(str) End Function +''' Returns the tangent of an angle. +''' Any valid numeric expression that expresses an angle in radians. Function Tan(number) End Function +''' Returns the current system time. Function Time End Function +''' Returns the number of seconds that have elapsed since 12:00 AM. Function Timer End Function +''' Returns a Variant of subtype Date for a specific hour, minute, and second. +''' Number between 0 and 23, inclusive, or a numeric expression. +''' Number between 0 and 59, inclusive, or a numeric expression. +''' Number between 0 and 59, inclusive, or a numeric expression. Function TimeSerial(hour, minute, second) End Function +''' Returns a Variant of subtype Date. +''' String expression that represents a time. Function TimeValue(time) End Function +''' Returns a string without leading and trailing spaces. +''' String expression from which leading and trailing spaces are removed. Function Trim(str) ' As String End Function +''' Returns a string that provides subtype information about a variable. +''' Variable name. Function TypeName(var) ' As String End Function ''' Returns the largest available subscript for the indicated dimension of an array. +''' Name of the array variable. Function UBound(arrayname) ' As Long End Function ''' Returns the largest available subscript for the indicated dimension of an array. +''' Name of the array variable. +''' Whole number indicating which dimension's upper bound is returned. Function UBound(arrayname, dimension) ' As Long End Function ''' Returns a string that has been converted to uppercase. +''' String expression to be converted. Function UCase(str) ' As String End Function +''' Returns a string with certain escape sequences converted back to their original characters. +''' String to be unescaped. Function Unescape(str) ' As String End Function +''' Returns a value indicating the subtype of a variable. +''' Variable name. Function VarType(var) ' as Integer End Function +''' Returns a whole number between 1 and 7, inclusive, representing the day of the week. +''' Any expression that can represent a date. Function Weekday(date) ' as Integer End Function +''' Returns a whole number between 1 and 7, inclusive, representing the day of the week. +''' Any expression that can represent a date. +''' Constant that specifies the first day of the week. Function Weekday(date, firstdayofweek) ' as Integer End Function +''' Returns a string indicating the specified day of the week. +''' Numeric designation for a day of the week. Function WeekdayName(weekday) ' As String End Function +''' Returns a string indicating the specified day of the week. +''' Numeric designation for a day of the week. +''' Boolean value that indicates if the weekday name is to be abbreviated. Function WeekdayName(weekday, abbreviate) ' As String End Function +''' Returns a string indicating the specified day of the week. +''' Numeric designation for a day of the week. +''' Boolean value that indicates if the weekday name is to be abbreviated. +''' Numeric value indicating the first day of the week. Function WeekdayName(weekday, abbreviate, firstdayofweek) ' As String End Function @@ -620,36 +924,36 @@ Function Year(date) End Function ''' Enum VbVarType -Const vbEmpty = 0 -Const vbNull = 1 -Const vbInteger = 2 -Const vbLong = 3 -Const vbSingle = 4 -Const vbDouble = 5 -Const vbCurrency = 6 -Const vbDate = 7 -Const vbString = 8 -Const vbObject = 9 -Const vbError = 10 -Const vbBoolean = 11 -Const vbVariant = 12 -Const vbDataObject = 13 -Const vbDecimal = 14 -Const vbByte = 17 -Const vbArray = 8192 +Const vbEmpty = 0 ' Uninitialized (default) +Const vbNull = 1 ' Contains no valid data +Const vbInteger = 2 ' Integer subtype +Const vbLong = 3 ' Long subtype +Const vbSingle = 4 ' Single subtype +Const vbDouble = 5 ' Double subtype +Const vbCurrency = 6 ' Currency subtype +Const vbDate = 7 ' Date subtype +Const vbString = 8 ' String subtype +Const vbObject = 9 ' Object subtype +Const vbError = 10 ' Error subtype +Const vbBoolean = 11 ' Boolean subtype +Const vbVariant = 12 ' Variant subtype (used only for arrays of variants) +Const vbDataObject = 13 ' Data object subtype +Const vbDecimal = 14 ' Decimal subtype +Const vbByte = 17 ' Byte subtype +Const vbArray = 8192 ' Array flag (OR'ed with other type constants) ''' End Enum ' VbVarType -Const Nothing = Nothing +Const Nothing = Nothing ' The Nothing keyword is used to indicate that an object variable does not refer to any object. It is not the same as Null or Empty. You can use the IsObject Function to determine whether a variable refers to an object. Const Empty = Empty ' The Empty keyword is used to indicate an uninitialized variable value. This is not the same thing as Null. You can use the IsEmpty Function to determine whether a variable is initialized. -Const Null = Null +Const Null = Null ' The Null keyword is used to indicate that a variable contains no valid data. It is not the same as Empty or Nothing. You can use the IsNull Function to determine whether a variable contains no valid data. -Const False = False ' Boolean -Const True = True +Const False = False ' Boolean. Value is equal to 0. +Const True = True ' Boolean. Value is equal to -1. ''' Enum VbTriState -Const vbUseDefault = -2 -Const vbTrue = -1 -Const vbFalse = 0 +Const vbUseDefault = -2 ' Use system default setting +Const vbTrue = -1 ' Boolean true value +Const vbFalse = 0 ' Boolean false value ''' End Enum ''' Enum VbCompareMethod @@ -658,29 +962,32 @@ Const vbTextCompare = 1 ' Perform a textual comparison Const vbDatabaseCompare = 2 ' Only in Access ''' End Enum -Const vbCr = Chr(13) -Const vbCrLf = Chr(13) & Chr(10) -Const vbFormFeed = Chr(12) -Const vbLf = Chr(10) -Const vbNewLine = Chr(13) & Chr(10) -Const vbNullChar = Chr(0) -Const vbNullString = Empty -Const vbTab = Chr(9) -Const vbVerticalTab = Chr(11) +''' Enum StringConstants +Const vbBack = Chr(8) ' Backspace character +Const vbCr = Chr(13) ' Carriage return character +Const vbCrLf = Chr(13) & Chr(10) ' Carriage return and line feed characters +Const vbFormFeed = Chr(12) ' Form feed character +Const vbLf = Chr(10) ' Line feed character +Const vbNewLine = Chr(13) & Chr(10) ' Carriage return and line feed characters +Const vbNullChar = Chr(0) ' Null character +Const vbNullString = Empty ' A zero-length string, which is not the same as Null or Empty. +Const vbTab = Chr(9) ' Tab character +Const vbVerticalTab = Chr(11) ' Vertical tab character +''' End Enum ''' Enum VbDateTimeFormat -Const vbGeneralDate = 0 +Const vbGeneralDate = 0 ' Display a date using the long date format specified in your computer's regional settings, and a time using the time format specified in your computer's regional settings. Const vbLongDate = 1 ' Display a date using the long date format specified in your computer's regional settings. Const vbShortDate = 2 ' Display a date using the short date format specified in your computer's regional settings. Const vbLongTime = 3 ' Display a time using the time format specified in your computer's regional settings. -Const vbShortTime = 4 +Const vbShortTime = 4 ' Display a time using the short time format specified in your computer's regional settings. ''' End Enum ''' Enum VbFirstWeekOfYear -Const vbUseSystemDayOfWeek = 0 -Const vbFirstJan1 = 1 -Const vbFirstFourDays = 2 -Const vbFirstFullWeek = 3 +Const vbUseSystemDayOfWeek = 0 ' Use the system setting for the first day of the week. +Const vbFirstJan1 = 1 ' The first week of the year is the week that contains January 1. +Const vbFirstFourDays = 2 ' The first week of the year is the week that contains at least four days in the new year. +Const vbFirstFullWeek = 3 ' The first week of the year is the first full week of the year, starting on the first day of the week. ''' End Enum Const vbObjectError = &h80040000 ' User-defined error numbers should be greater than this value. @@ -693,40 +1000,40 @@ Const vbThursday = 5 Const vbFriday = 6 Const vbSaturday = 7 Const vbSunday = 1 -Const vbUseSystem = 0 +Const vbUseSystem = 0 ' Use the system setting for the first day of the week. ''' End Enum ''' Enum VbMsgBoxStyle Const vbOKOnly = 0 ' Display OK button only. Const vbOKCancel = 1 ' Display OK and Cancel buttons -Const vbAbortRetryIgnore = 2 -Const vbYesNoCancel = 3 -Const vbYesNo = 4 +Const vbAbortRetryIgnore = 2 ' Display Abort, Retry, and Ignore buttons +Const vbYesNoCancel = 3 ' Display Yes, No, and Cancel buttons +Const vbYesNo = 4 ' Display Yes and No buttons Const vbRetryCancel = 5 ' Display Retry and Cancel buttons. -Const vbCritical = 16 +Const vbCritical = 16 ' Display Critical Message icon Const vbQuestion = 32 ' Display Warning Query icon. -Const vbExclamation = 48 -Const vbInformation = 64 -Const vbDefaultButton1 = 0 -Const vbDefaultButton2 = 256 -Const vbDefaultButton3 = 512 -Const vbDefaultButton4 = 768 -Const vbApplicationModal = 0 -Const vbSystemModal = &h01000 -Const vbMsgBoxHelpButton = &h04000 -Const VbMsgBoxSetForeground = &h010000 -Const vbMsgBoxRight = &h080000 -Const vbMsgBoxRtlReading = &h100000 +Const vbExclamation = 48 ' Display Warning Message icon +Const vbInformation = 64 ' Display Information Message icon +Const vbDefaultButton1 = 0 ' First button is default +Const vbDefaultButton2 = 256 ' Second button is default +Const vbDefaultButton3 = 512 ' Third button is default +Const vbDefaultButton4 = 768 ' Fourth button is default +Const vbApplicationModal = 0 ' Application modal; the user must respond to the message box before continuing work in the current application +Const vbSystemModal = &h01000 ' System modal; all applications are suspended until the user responds to the message box +Const vbMsgBoxHelpButton = &h04000 ' Adds Help button to the message box +Const VbMsgBoxSetForeground = &h010000 ' Specifies the message box window as the foreground window +Const vbMsgBoxRight = &h080000 ' Text is right aligned +Const vbMsgBoxRtlReading = &h100000 ' Specifies text should appear as right-to-left reading on Hebrew and Arabic systems ''' End Enum ''' Enum VbMsgBoxResult -Const vbOK = 1 -Const vbCancel = 2 -Const vbAbort = 3 +Const vbOK = 1 ' OK button was clicked +Const vbCancel = 2 ' Cancel button was clicked +Const vbAbort = 3 ' Abort button was clicked Const vbRetry = 4 ' Retry button was clicked -Const vbIgnore = 5 -Const vbYes = 6 -Const vbNo = 7 +Const vbIgnore = 5 ' Ignore button was clicked +Const vbYes = 6 ' Yes button was clicked +Const vbNo = 7 ' No button was clicked ''' End Enum ''' Enum ColorConstants diff --git a/ObjectDefs.vbs b/ObjectDefs.vbs index 6fef2a5..882bdbb 100644 --- a/ObjectDefs.vbs +++ b/ObjectDefs.vbs @@ -3,10 +3,13 @@ Option Explicit ''' An intrinsic global object that can send output to a script debugger, such as the Microsoft Script Debugger. Class Debug + ''' Sends a string to the debugger. + ''' String to send to the debugger. Sub Write(str) End Sub - - + + ''' Sends a string followed by a newline character to the debugger. + ''' String to send to the debugger. Sub WriteLine(str) End Sub End Class @@ -14,346 +17,552 @@ End Class ''' Object that stores data key, item pairs. Class Dictionary - + + ''' Adds a key and item pair to a Dictionary object. + ''' The key associated with the item being added. + ''' The item associated with the key being added. Sub Add(key, value) End Sub - + + ''' Sets or returns the comparison mode for comparing string keys in a Dictionary object. Property Get CompareMode ' As Long End Property + ''' Sets or returns the comparison mode for comparing string keys in a Dictionary object. + ''' Comparison mode. Property Let CompareMode(Mode) End Property - + + ''' Returns the number of items in a collection or Dictionary object. Property Get Count ' As Long End Property - + + ''' Returns true if a specified key exists in the Dictionary object, false if it does not. + ''' Key value being searched for in the Dictionary object. Function Exists(key) ' as Boolean End Function - + + ''' Returns the hash value for a specified key in a Dictionary object. + ''' Key associated with the item for which the hash value is to be returned. Property Get HashVal(key) ' As Long End Property - + + ''' Sets or returns an item for a specified key in a Dictionary object. + ''' Key associated with the item being retrieved or added. Public Default Property Get Item(key) End Property - + + ''' Returns an array containing all the items in a Dictionary object. + ''' Key associated with the item being retrieved. Function Items(key) ' As Variant End Function - + + ''' Sets a key in a Dictionary object. + ''' Key being changed. Property Get Key(key) End Property - + + ''' Returns an array containing all existing keys in a Dictionary object. Function Keys() ' As Variant End Function - + + ''' Removes a key, item pair from a Dictionary object. + ''' Key associated with the key, item pair you want to remove from the Dictionary object. Sub Remove(key) End Sub + ''' Removes all key, item pairs from a Dictionary object. Sub RemoveAll() End Sub - + End Class ''' Contains information about run-time errors. Accepts the Raise and Clear methods for generating and clearing run-time errors. Class Err + ''' Clears all property settings of the Err object. Sub Clear() End Sub + ''' Returns or sets a string expression containing a descriptive string associated with an error. Property Get Description End Property + ''' Returns or sets an integer containing the context ID for a topic in a Help file. Property Get HelpContext End Property + ''' Returns or sets a string expression containing the fully qualified path to a Help file. Property Get HelpFile End Property + ''' Returns or sets a numeric value specifying an error. Property Get Number End Property + ''' Generates a run-time error. + ''' Long integer that identifies the nature of the error. Sub Raise(number) End Sub - + + ''' Generates a run-time error. + ''' Long integer that identifies the nature of the error. + ''' String expression naming the object or application that generated the error. + ''' String expression describing the error. + ''' The fully qualified path to the Help file in which help on this error can be found. + ''' The context ID identifying a topic within helpfile that provides help for the error. Sub Raise(number, source, description, helpfile, helpcontext) End Sub + ''' Returns or sets a string expression specifying the name of the object or application that originally generated the error. Property Get Source End Property - + End Class +''' Provides access to all the properties of a file. Class File + ''' Sets or returns the attributes of files or folders. Property Get Attributes ' as Long End Property + ''' Copies a specified file from one location to another. + ''' Destination where the file is to be copied. Sub Copy(Destination) End Sub + ''' Copies a specified file from one location to another. + ''' Destination where the file is to be copied. + ''' Boolean value that indicates if existing files are to be overwritten. Sub Copy(Destination, OverWriteFiles) End Sub + ''' Returns the date and time that the specified file or folder was created. Property Get DateCreated ' as Date End Property + ''' Returns the date and time that the specified file or folder was last accessed. Property Get DateLastAccessed ' as Date End Property - + + ''' Returns the date and time that the specified file or folder was last modified. Property Get DateLastModified ' as Date End Property + ''' Deletes a specified file or folder. Sub Delete() End Sub + ''' Deletes a specified file or folder. + ''' Boolean value that is True if files or folders with the read-only attribute should be deleted; False if they should not. Sub Delete(Force) End Sub + ''' Returns a Drive object corresponding to the drive on which the specified file or folder resides. Property Get Drive ' as Drive End Property + ''' Moves a specified file or folder from one location to another. + ''' Destination where the file or folder is to be moved. Sub Move(Destination) End Sub + ''' Sets or returns the name of a specified file or folder. Property Get Name ' As String End Property + ''' Opens a specified file and returns a TextStream object that can be used to read from the file. Function OpenAsTextStream() ' As TextStream End Function + ''' Opens a specified file and returns a TextStream object that can be used to read from the file. + ''' Indicates input/output mode. Function OpenAsTextStream(IOMode) ' As TextStream End Function + ''' Opens a specified file and returns a TextStream object that can be used to read from the file. + ''' Indicates input/output mode. + ''' One of three Tristate values used to indicate the format of the opened file. Function OpenAsTextStream(IOMode, Format) ' As TextStream End Function + ''' Returns the folder object for the parent of the specified file or folder. Property Get ParentFolder ' As Folder End Property + ''' Returns the path for a specified file, folder, or drive. Property Get Path ' As String End Property + ''' Returns the short name used by programs that require the earlier 8.3 naming convention. Property Get ShortName ' As String End Property + ''' Returns the short path used by programs that require the earlier 8.3 file naming convention. Property Get ShortPath ' As String End Property + ''' For files, returns the size, in bytes, of the specified file. For folders, returns the size, in bytes, of all files and subfolders contained in the folder. Property Get Size ' as Long End Property + ''' Returns information about the type of a file or folder. Property Get Type ' As String End Property End Class +''' Provides access to all the properties of a folder. Class Folder + ''' Sets or returns the attributes of files or folders. Property Get Attributes ' as Long End Property + ''' Copies a specified folder from one location to another. + ''' Destination where the folder is to be copied. Sub Copy(Destination) End Sub + ''' Copies a specified folder from one location to another. + ''' Destination where the folder is to be copied. + ''' Boolean value that indicates if existing files are to be overwritten. Sub Copy(Destination, OverWriteFiles) End Sub + ''' Returns the date and time that the specified folder was created. Property Get DateCreated ' as Date End Property + ''' Returns the date and time that the specified folder was last accessed. Property Get DateLastAccessed ' as Date End Property - + + ''' Returns the date and time that the specified folder was last modified. Property Get DateLastModified ' as Date End Property + ''' Deletes a specified folder. Sub Delete() End Sub + ''' Deletes a specified folder. + ''' Boolean value that is True if folders with the read-only attribute should be deleted; False if they should not. Sub Delete(Force) End Sub + ''' Returns a Drive object corresponding to the drive on which the specified folder resides. Property Get Drive ' as Drive End Property + ''' Returns a Files collection consisting of all File objects contained in the specified folder, including those with hidden and system file attributes set. Property Get Files ' as FileCollection End Property + ''' Returns True if the specified folder is the root folder; False if it is not. Property Get IsRootFolder ' as Boolean End Property + ''' Moves a specified folder from one location to another. + ''' Destination where the folder is to be moved. Sub Move(Destination) End Sub + ''' Sets or returns the name of a specified folder. Property Get Name ' As String End Property + ''' Creates a file as a TextStream object. + ''' String expression that identifies the file to create. Function CreateTextFile(FileName) ' As TextStream End Function + ''' Creates a file as a TextStream object. + ''' String expression that identifies the file to create. + ''' Boolean value that indicates whether you can overwrite an existing file. Function CreateTextFile(FileName, Overwrite) ' As TextStream End Function + ''' Creates a file as a TextStream object. + ''' String expression that identifies the file to create. + ''' Boolean value that indicates whether you can overwrite an existing file. + ''' Boolean value that indicates whether the file is created as a Unicode or ASCII file. Function CreateTextFile(FileName, Overwrite, Unicode) ' As TextStream End Function + ''' Returns the folder object for the parent of the specified folder. Property Get ParentFolder ' As Folder End Property + ''' Returns the path for a specified folder. Property Get Path ' As String End Property + ''' Returns the short name used by programs that require the earlier 8.3 naming convention. Property Get ShortName ' As String End Property + ''' Returns the short path used by programs that require the earlier 8.3 file naming convention. Property Get ShortPath ' As String End Property + ''' For folders, returns the size, in bytes, of all files and subfolders contained in the folder. Property Get Size ' as Long End Property + ''' Returns a Folders collection consisting of all folders contained in a specified folder. Property Get SubFolders ' as FolderCollection End Property + ''' Returns information about the type of a folder. Property Get Type ' As String End Property End Class +''' Provides access to a computer's file system. Class FileSystemObject + ''' Appends a name to an existing path. + ''' Existing path to which name is appended. + ''' Name being appended to the existing path. Function BuildPath(path, name) ' As String End Function + ''' Copies one or more files from one location to another. + ''' Character string file specification, which can include wildcard characters, for one or more files to be copied. + ''' Character string destination where the file or files from source are to be copied. Sub CopyFile(source, destination) End Sub + ''' Copies one or more files from one location to another. + ''' Character string file specification, which can include wildcard characters, for one or more files to be copied. + ''' Character string destination where the file or files from source are to be copied. + ''' Boolean value that indicates if existing files are to be overwritten. Sub CopyFile(source, destination, overwrite) End Sub + ''' Recursively copies a folder from one location to another. + ''' Character string folder specification, which can include wildcard characters, for one or more folders to be copied. + ''' Character string destination where the folder and subfolders from source are to be copied. Sub CopyFolder(source, destination) End Sub + ''' Recursively copies a folder from one location to another. + ''' Character string folder specification, which can include wildcard characters, for one or more folders to be copied. + ''' Character string destination where the folder and subfolders from source are to be copied. + ''' Boolean value that indicates if existing folders are to be overwritten. Sub CopyFolder(source, destination, overwrite) End Sub + ''' Creates a folder. + ''' String expression that identifies the folder to create. Function CreateFolder(foldername) ' As Folder End Function + ''' Creates a file as a TextStream object. + ''' String expression that identifies the file to create. Function CreateTextFile(filename) ' As TextStream End Function + ''' Creates a file as a TextStream object. + ''' String expression that identifies the file to create. + ''' Boolean value that indicates whether you can overwrite an existing file. Function CreateTextFile(filename, overwrite) ' As TextStream End Function + ''' Creates a file as a TextStream object. + ''' String expression that identifies the file to create. + ''' Boolean value that indicates whether you can overwrite an existing file. + ''' Boolean value that indicates whether the file is created as a Unicode or ASCII file. Function CreateTextFile(filename, overwrite, unicode) ' As TextStream End Function + ''' Deletes a specified file. + ''' String expression that specifies one or more files to delete. Sub DeleteFile(filename) End Sub + ''' Deletes a specified file. + ''' String expression that specifies one or more files to delete. + ''' Boolean value that is True if files with the read-only attribute should be deleted; False if they should not. Sub DeleteFile(filename, force) End Sub + ''' Deletes a specified folder and its contents. + ''' String expression that specifies one or more folders to delete. Sub DeleteFolder(filename) End Sub + ''' Deletes a specified folder and its contents. + ''' String expression that specifies one or more folders to delete. + ''' Boolean value that is True if folders with the read-only attribute should be deleted; False if they should not. Sub DeleteFolder(filename, force) End Sub + ''' Returns a Drives collection consisting of all Drive objects available on the local machine. Property Get Drives ' As DriveCollection End Property + ''' Returns True if the specified drive exists; False if it does not. + ''' Drive letter or complete path specification. Function DriveExists(drive) ' As Boolean End Function + ''' Returns True if a specified file exists; False if it does not. + ''' String expression that specifies a file name. Function FileExists(filename) ' As Boolean End Function + ''' Returns True if a specified folder exists; False if it does not. + ''' String expression that specifies a folder name. Function FolderExists(foldername) ' As Boolean End Function + ''' Returns a complete and unambiguous path from a provided path specification. + ''' Path specification to change to a complete and unambiguous path. Function GetAbsolutePathName(path) ' As String End Function + ''' Returns a string containing the base name of the last component, less any file extension, in a path. + ''' Path specification for the component whose base name is to be returned. Function GetBaseName(path) ' As String End Function + ''' Returns a Drive object corresponding to the drive in a specified path. + ''' Path specification whose drive is to be returned. Function GetDrive(drive) ' As Drive End Function + ''' Returns a string containing the name of the drive for a specified path. + ''' Path specification for the component whose drive name is to be returned. Function GetDriveName(drive) ' As String End Function + ''' Returns a string containing the extension name for the last component in a path. + ''' Path specification for the component whose extension name is to be returned. Function GetExtensionName(path) ' As String End Function + ''' Returns a File object corresponding to the file in a specified path. + ''' Path specification for the file that you want to get a File object for. Function GetFile(filename) ' As File End Function + ''' Returns a string containing the name of the last component, less any file extension, in a path. + ''' Path specification for the component whose file name is to be returned. Function GetFileName(filename) ' As String End Function + ''' Returns version information for the specified file. + ''' String expression that specifies a file name. Function GetFileVersion(filename) ' As String End Function + ''' Returns a Folder object corresponding to the folder in a specified path. + ''' Path specification for the folder that you want to get a Folder object for. Function GetFolder(foldername) ' As Folder End Function + ''' Returns a string containing the name of the parent folder of the last component in a specified path. + ''' Path specification for the component whose parent folder name is to be returned. Function GetParentFolderName(foldername) ' As String End Function + ''' Returns the special folder specified. + ''' The name of the special folder to be returned. Function GetSpecialFolder(folderspec) ' As Folder End Function - + + ''' Returns a TextStream object corresponding to the standard input, output, or error stream. + ''' Indicates which standard stream to return. Function GetStandardStream(StandardStreamType) ' As TextStream End Function + ''' Returns a TextStream object corresponding to the standard input, output, or error stream. + ''' Indicates which standard stream to return. + ''' Boolean value indicating whether the stream is Unicode or ASCII. Function GetStandardStream(StandardStreamType, Unicode) ' As TextStream End Function + ''' Returns a randomly generated temporary file or folder name that is useful for performing operations that require a temporary file or folder. Function GetTempName() ' As String End Function + ''' Moves one or more files from one location to another. + ''' Path to the file or files to be moved. + ''' Path where the file or files are to be moved. Sub MoveFile(source, destination) End Sub + ''' Moves one or more folders from one location to another. + ''' Path to the folder or folders to be moved. + ''' Path where the folder or folders are to be moved. Sub MoveFolder(source, destination) End Sub + ''' Opens a specified file and returns a TextStream object that can be used to read from, write to, or append to the file. + ''' String expression that identifies the file to open. Function OpenTextFile(filename) ' As TextStream End Function + ''' Opens a specified file and returns a TextStream object that can be used to read from, write to, or append to the file. + ''' String expression that identifies the file to open. + ''' Indicates input/output mode. Function OpenTextFile(filename, iomode) ' As TextStream End Function + ''' Opens a specified file and returns a TextStream object that can be used to read from, write to, or append to the file. + ''' String expression that identifies the file to open. + ''' Indicates input/output mode. + ''' Boolean value that indicates whether a new file can be created if the specified filename doesn't exist. Function OpenTextFile(filename, iomode, create) ' As TextStream End Function + ''' Opens a specified file and returns a TextStream object that can be used to read from, write to, or append to the file. + ''' String expression that identifies the file to open. + ''' Indicates input/output mode. + ''' Boolean value that indicates whether a new file can be created if the specified filename doesn't exist. + ''' One of three Tristate values used to indicate the format of the opened file. Function OpenTextFile(filename, iomode, create, format) ' As TextStream End Function - + End Class +''' Provides access to the properties of a particular disk drive or network share. Class Drive + ''' Returns the amount of space available to a user on the specified drive or network share. Property Get AvailableSpace ' As Double End Property + ''' Returns the drive letter of a physical local drive or a network share. Property Get DriveLetter ' As String End Property + ''' Returns a value indicating the type of a specified drive. Property Get DriveType ' As Long End Property + ''' Returns the type of file system in use for the specified drive. Property Get FileSystem ' As String End Property + ''' Returns the amount of free space available to a user on the specified drive or network share. Property Get FreeSpace ' As Double End Property + ''' Returns True if the specified drive is ready; False if it is not. Property Get IsReady ' As Boolean End Property + ''' Returns the path for a specified drive. Property Get Path ' As String End Property + ''' Returns a Folder object representing the root folder of a specified drive. Property Get RootFolder ' As Folder End Property + ''' Returns the decimal serial number used to uniquely identify a disk volume. Property Get SerialNumber ' As Long End Property + ''' Returns the network share name for a specified drive. Property Get ShareName ' As String End Property + ''' Returns the total space, in bytes, of a drive or network share. Property Get TotalSize ' As Double End Property + ''' Sets or returns the volume name of the specified drive. Property Get VolumeName ' As String End Property @@ -363,241 +572,383 @@ End Class ''' Provides access to the read-only properties of a regular expression match. Class Match + ''' Gets the position in the original string where the first character of the match is found. + ''' A Long value representing the zero-based index of the first character of the match. Property Get FirstIndex ' As Long End Property + ''' Gets the length of the match in the original string. + ''' A Long value representing the number of characters in the match. Property Get Length ' As Long End Property + ''' Gets a collection containing all the submatches (captured groups) found during the regular expression search. + ''' A String array containing the submatches. Each element corresponds to a captured group in the regular expression pattern. Property Get SubMatches ' As String() End Property + ''' Gets the actual text of the match found in the original string. + ''' A String containing the matched text. Property Get Value ' As String End Property End Class +''' Provides simple regular expression support. Class RegExp + ''' Executes a regular expression search against a specified string. + ''' The text string upon which the regular expression is executed. Function Execute(str) ' as Object End Function + ''' Sets or returns a Boolean value that indicates if a pattern should match all occurrences in an entire search string or just the first one. Property Get Global ' As Boolean End Property + ''' Sets or returns a Boolean value that indicates if a pattern should match all occurrences in an entire search string or just the first one. + ''' Boolean value. Property Let Global(b) End Property + ''' Sets or returns a Boolean value that indicates if a pattern search is case-sensitive or not. Property Get IgnoreCase ' As Boolean End Property + ''' Sets or returns a Boolean value that indicates if a pattern search is case-sensitive or not. + ''' Boolean value. Property Let IgnoreCase(b) End Property + ''' Sets or returns the regular expression pattern being searched for. Property Get Pattern ' As String End Property + ''' Sets or returns the regular expression pattern being searched for. + ''' Regular expression pattern. Property Let Pattern(s) End Property - + + ''' Replaces text found in a regular expression search. + ''' The text string in which the text replacement is to occur. + ''' The replacement text string. Function Replace(string1, string2) ' As String End Function + ''' Executes a regular expression search against a specified string and returns a Boolean value that indicates if a pattern match was found. + ''' The text string upon which the regular expression is executed. Function Test(str) ' As Boolean End Function End Class +''' Facilitates sequential access to file. Class TextStream + ''' Returns True if the file pointer is positioned immediately before the end-of-line marker in a TextStream file; False if it is not. Property Get AtEndOfLine ' As Boolean End Property + ''' Returns True if the file pointer is at the end of a TextStream file; False if it is not. Property Get AtEndOfStream ' As Boolean End Property + ''' Closes an open TextStream file. Sub Close() End Sub + ''' Returns the column number of the current character position in a TextStream file. Property Get Column ' As Long End Property + ''' Returns the current line number in a TextStream file. Property Get Line ' As Long End Property + ''' Reads a specified number of characters from a TextStream file and returns the resulting string. + ''' Number of characters you want to read from the file. Function Read(Characters) ' As String End Function + ''' Reads an entire TextStream file and returns the resulting string. Function ReadAll() ' As String End Function + ''' Reads an entire line from a TextStream file and returns the resulting string. Function ReadLine() ' As String End Function + ''' Skips a specified number of characters when reading a TextStream file. + ''' Number of characters to skip when reading a file. Sub Skip(Characters) End Sub + ''' Skips the next line when reading a TextStream file. Sub SkipLine() End Sub + ''' Writes a specified string to a TextStream file. + ''' The text you want to write to the file. Sub Write(Text) End Sub + ''' Writes a specified number of newline characters to a TextStream file. + ''' Number of newline characters you want to write to the file. Sub WriteBlankLines(Lines) End Sub + ''' Writes a newline character to a TextStream file. Sub WriteLine() End Sub + ''' Writes a specified string and newline character to a TextStream file. + ''' The text you want to write to the file. Sub WriteLine(text) End Sub End Class +''' Provides access to the root object of the Windows Script Host object model. Class WScript + ''' Returns the WScript object, which is the root object of the Windows Script Host object model. Property Get Application End Property + ''' Returns the WshArguments object (a collection of arguments). Property Get Arguments End Property + ''' Returns the build version of Windows Script Host. Property Get BuildVersion ' As String End Property - + + ''' Connects the object's event sources to functions with a given prefix. + ''' Object to be connected. + ''' String value indicating the function prefix. Sub ConnectObject(objEventSource, strPrefix) End Sub + ''' Creates an object. + ''' String value indicating the programmatic identifier (ProgID) of the object you want to create. Function CreateObject(strProgID) ' As Object End Function + ''' Creates an object. + ''' String value indicating the programmatic identifier (ProgID) of the object you want to create. + ''' String value indicating the function prefix. Function CreateObject(strProgID, strPrefix) ' As Object End Function + ''' Disconnects a connected object's event sources. + ''' Object to be disconnected. Sub DisconnectObject(obj) End Sub + ''' Outputs text to either a message box or the command console window. + ''' List of items to be displayed. Sub Echo(args) End Sub + ''' Returns the fully qualified path of the host executable. Property Get FullName ' As String End Property + ''' Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file. + ''' Fully qualified path to the file containing the object persisted to disk. Function GetObject(strPathname) ' As Object End Function + ''' Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file. + ''' Fully qualified path to the file containing the object persisted to disk. + ''' Program identifier. Function GetObject(strPathname, strProgID) ' As Object End Function + ''' Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file. + ''' Fully qualified path to the file containing the object persisted to disk. + ''' Program identifier. + ''' String value indicating the function prefix. Function GetObject(strPathname, strProgID, strPrefix) ' As Object End Function + ''' Sets the script mode, or identifies the script mode. Property Get Interactive ' As Boolean End Property + ''' Returns the name of the WScript object (the host executable file). Property Get Name ' As String End Property + ''' Returns the name of the directory containing the host executable. Property Get Path ' As String End Property + ''' Forces the script to stop execution at any time. Sub Quit() End Sub + ''' Forces the script to stop execution at any time. + ''' Numeric value returned as the process exit code. Sub Quit(ErrorCode) End Sub + ''' Returns the full path of the currently running script. Property Get ScriptFullName ' As String End Property + ''' Returns the file name of the currently running script. Property Get ScriptName ' As String End Property + ''' Suspends script execution for a specified length of time, then continues execution. + ''' Numeric value indicating the interval (in milliseconds) you want the script to be inactive. Sub Sleep(ms) End Sub + ''' Exposes the write-only error output stream of the current script. Property Get StdErr ' As TextStream End Property + ''' Exposes the read-only input stream of the current script. Property Get StdIn ' As TextStream End Property + ''' Exposes the write-only output stream of the current script. Property Get StdOut ' As TextStream End Property + ''' Returns the timeout setting in seconds for the WScript object. Property Get TimeOut ' As Integer End Property + ''' Returns the version of Windows Script Host. Property Get Version ' As String End Property End Class +''' Provides access to Windows shell functionality. Class Shell + ''' Activates an application window. + ''' Specifies which application to activate. + ''' Optional. Boolean value indicating whether the script should wait for the application to become active. Function AppActivate(App, Wait) ' As Boolean End Function + ''' Creates a shortcut, or assigns a value to an environment variable. + ''' String value indicating the pathname of the shortcut to create. Function CreateShortcut(PathLink) End Function - + + ''' Runs an application in a child command-shell, providing access to the StdIn/StdOut/StdErr streams. + ''' String value indicating the command line used to run the script. Function Exec(Command) End Function - + + ''' Returns an environment variable's expanded value. + ''' String value indicating the name of the environment variable you want to expand. Function ExpandEnvironmentStrings(Src) ' As String End Function - + + ''' Adds an event entry to a log file. + ''' Numeric value indicating the type of entry. + ''' String value containing the log entry text. + ''' Optional. String value indicating the name of the computer system where the event log is stored. Function LogEvent(Type, Message, Target) ' As Boolean End Function - + + ''' Displays text in a pop-up message box. + ''' String value that contains the text you want to appear in the pop-up message box. + ''' Optional. Numeric value indicating the maximum length of time (in seconds) you want the pop-up message box displayed. + ''' Optional. String value that contains the text you want to appear as the title of the pop-up message box. + ''' Optional. Numeric value indicating the type of buttons and icons you want in the pop-up message box. Function Popup(Text, SecondsToWait, Title, Type) ' As Integer End Function - + + ''' Deletes a key or one of its values from the registry. + ''' String value indicating the name of the registry key or key value you want to delete. Sub RegDelete(Name) End Sub - + + ''' Returns the value of a key or value-name from the registry. + ''' String value indicating the key or value-name whose value you want. Function RegRead(Name) End Function - + + ''' Creates a new key, adds another value-name to an existing key (and assigns it a value), or changes the value of an existing value-name. + ''' String value indicating the key-name, value-name, or value you want to create, add, or change. + ''' The name you want to assign to the value. + ''' Optional. String value indicating the value's data type. Sub RegWrite(Name, Value, Type) End Sub - + + ''' Runs a program in a new process. + ''' String value indicating the command line you want to run. + ''' Optional. Integer value indicating the appearance of the program's window. + ''' Optional. Boolean value indicating whether the script waits for the program to finish executing before continuing. Function Run(Command, WindowStyle, WaitOnReturn) ' As Integer End Function - + + ''' Sends one or more keystrokes to the active window. + ''' String value indicating the keystroke(s) you want to send. + ''' Optional. Boolean value indicating whether or not to wait for the keys to be processed before returning control to your script. Sub SendKeys(Keys, Wait) End Sub + ''' Returns the WshEnvironment object (a collection of environment variables). + ''' Optional. String value indicating the location of the environment variable. Public Default Property Get Environment(Type) End Property + ''' Returns or sets the current active directory. Property Get CurrentDirectory End Property - + + ''' Returns or sets the current active directory. Property Let CurrentDirectory End Property + ''' Returns a WshSpecialFolders object (a collection of special folders). Property Get SpecialFolders End Property End Class +''' Provides properties and methods for working with picture objects. Private Class Picture + ''' Returns a handle to the picture. Property Get Handle ' As Long End Property + ''' Renders the picture to a specified device context. + ''' Handle to the device context where the picture is to be rendered. + ''' Horizontal coordinate where the picture is placed. + ''' Vertical coordinate where the picture is placed. + ''' Horizontal size of the destination rectangle. + ''' Vertical size of the destination rectangle. + ''' Horizontal offset in the source picture. + ''' Vertical offset in the source picture. + ''' Horizontal extent of the source rectangle. + ''' Vertical extent of the source rectangle. + ''' Pointer to the bounding rectangle. Sub Render(hdc, x, y, cx, cy, xSrc, ySrc, cxSrc, cySrc, prcWBounds) End Sub + ''' Returns the height of the picture. Property Get Height ' As Long End Property + ''' Returns the palette handle for the picture. Property Get hPal ' As Long End Property + ''' Returns the type of the picture. Property Get Type ' As Integer End Property + ''' Returns the width of the picture. Property Get Width ' As Long End Property diff --git a/src/definitions/keywords.json b/src/definitions/keywords.json index e1528dc..dff84a4 100644 --- a/src/definitions/keywords.json +++ b/src/definitions/keywords.json @@ -1,66 +1,66 @@ { "ByRef": { - "documentation": "" + "documentation": "Indicates that an argument is passed by reference to a procedure." }, "ByVal": { - "documentation": "" + "documentation": "Indicates that an argument is passed by value to a procedure." }, "Call": { "documentation": "Transfers control to a Sub procedure or Function procedure" }, "Class": { - "documentation": "" + "documentation": "Declares the name of a class, as well as a definition of the variables, properties, and methods that comprise the class." }, "Const": { - "documentation": "" + "documentation": "Declares constants for use in place of literal values." }, "Dim": { - "documentation": "" + "documentation": "Declares variables and allocates storage space." }, "Do": { - "documentation": "" + "documentation": "Repeats a block of statements while a condition is True or until a condition becomes True." }, "Each": { - "documentation": "" + "documentation": "Used with For to iterate through the elements of an array or collection." }, "Else": { - "documentation": "" + "documentation": "Introduces a group of statements to be executed if the condition in an If statement is False." }, "End": { - "documentation": "" + "documentation": "Ends a procedure or block." }, "Erase": { - "documentation": "" + "documentation": "Reinitializes the elements of fixed-size arrays and releases dynamic array storage space." }, "Execute": { - "documentation": "" + "documentation": "Executes one or more specified statements." }, "ExecuteGlobal": { - "documentation": "" + "documentation": "Executes one or more specified statements in the global namespace of the script." }, "Exit": { - "documentation": "" + "documentation": "Exits a block of Do...Loop, For...Next, Function, or Sub code." }, "For": { - "documentation": "" + "documentation": "Repeats a group of statements a specified number of times." }, "Function": { - "documentation": "" + "documentation": "Declares the name, arguments, and code that form the body of a Function procedure." }, "If": { - "documentation": "" + "documentation": "Conditionally executes a group of statements, depending on the value of an expression." }, "In": { - "documentation": "" + "documentation": "Used with For Each to iterate through the elements of an array or collection." }, "Loop": { - "documentation": "" + "documentation": "Marks the end of a Do...Loop statement block." }, "New": { - "documentation": "" + "documentation": "Creates a new instance of an object." }, "Next": { - "documentation": "" + "documentation": "Marks the end of a For...Next statement block." }, "Option Explicit": { "documentation": "Used at script level to force explicit declaration of all variables in that script." @@ -72,10 +72,10 @@ "documentation": "Disables any enabled error handler in the current procedure." }, "Redim Preserve": { - "documentation": "" + "documentation": "Reallocates storage space for a dynamic array variable while preserving the existing data." }, "Property": { - "documentation": "" + "documentation": "Declares the name of a property and the property procedures used to store and retrieve its value." }, "Property Get": { "documentation": "Property procedure, which gets the value of a property." @@ -87,10 +87,10 @@ "documentation": "Property procedure, which sets a reference to an object." }, "Private": { - "documentation": "" + "documentation": "Declares private variables or procedures that are accessible only to the script where they are declared." }, "Public": { - "documentation": "" + "documentation": "Declares public variables or procedures that are accessible to all other procedures in all scripts." }, "Randomize": { "documentation": "Initializes the random-number generator." @@ -99,36 +99,36 @@ "documentation": "Used at the procedure level to reallocate storage space for dynamic array variables." }, "Rem": { - "documentation": "" + "documentation": "Indicates that the following text is a comment (remark) in the script." }, "Select Case": { - "documentation": "" + "documentation": "Executes one of several groups of statements, depending on the value of an expression." }, "Stop": { - "documentation": "" + "documentation": "Suspends execution of the script." }, "Step": { "documentation": "Amount counter is changed each time through the loop. If not specified, step defaults to one." }, "Sub": { - "documentation": "" + "documentation": "Declares the name, arguments, and code that form the body of a Sub procedure." }, "Then": { - "documentation": "" + "documentation": "Introduces a statement block to be executed if a condition in an If statement is True." }, "To": { - "documentation": "" + "documentation": "Separates the beginning and ending values of a loop counter or array indices." }, "Until": { - "documentation": "" + "documentation": "Specifies that the loop should continue until the condition becomes True." }, "Wend": { - "documentation": "" + "documentation": "Marks the end of a While...Wend statement block." }, "While": { - "documentation": "" + "documentation": "Executes a series of statements as long as a given condition is True." }, "With": { - "documentation": "" + "documentation": "Executes a series of statements on a single object or user-defined type." } } \ No newline at end of file diff --git a/src/definitions/operators.json b/src/definitions/operators.json index 6545a2b..e15df17 100644 --- a/src/definitions/operators.json +++ b/src/definitions/operators.json @@ -3,7 +3,7 @@ "documentation": "Performs a logical conjunction on two expressions." }, "Eqv": { - "documentation": "" + "documentation": "Performs a logical equivalence on two expressions." }, "Imp": { "documentation": "undocumented Used to perform a logical implication on two expressions." From 2f40709c6607b7f5ea9f7ca434a0d8a488405b85 Mon Sep 17 00:00:00 2001 From: "Jon D." Date: Wed, 9 Jul 2025 16:06:32 -0500 Subject: [PATCH 2/3] Update README.md broken logo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 20524a9..3996552 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # VBScript Extension for Visual Studio Code This extension implements basic language features of Visual Basic Script/VBScript/VBS for [Visual Studio Code](https://code.visualstudio.com/). -[![Version](https://vsmarketplacebadge.apphb.com/version/serpen.vbsvscode.svg)](https://marketplace.visualstudio.com/items?itemName=serpen.vbsvscode) +[![Version](https://Serpen.gallerycdn.vsassets.io/extensions/serpen/vbsvscode/1.2.1/1620233782061/Microsoft.VisualStudio.Services.Icons.Default)](https://marketplace.visualstudio.com/items?itemName=serpen.vbsvscode) [![Build status](https://ci.appveyor.com/api/projects/status/0i0hrbt657y8geef?svg=true)](https://ci.appveyor.com/project/Serpen/vbs-vscode)

@@ -44,4 +44,4 @@ You can support this project through PR with your changes or simply add an issue This extension is based on the Visual Basic extension shipped with VS Code and the design from AutoIt Extension from loganch. ## Purpose -This extension was founded to help developing with VBS in an buisness application (medico Klinische Dokumentation) \ No newline at end of file +This extension was founded to help developing with VBS in an buisness application (medico Klinische Dokumentation) From d07b5355de09ba1d2814545e085d34fbacfd7b27 Mon Sep 17 00:00:00 2001 From: "Jon D." Date: Wed, 9 Jul 2025 16:07:21 -0500 Subject: [PATCH 3/3] Update README.de.md fixed logo --- README.de.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.de.md b/README.de.md index b4d9f31..26a6c3b 100644 --- a/README.de.md +++ b/README.de.md @@ -1,7 +1,7 @@ # VBScript Extension für Visual Studio Code Diese Erweiterung bietet Sprachunterstützung für Visual Basic Script/VBScript/VBS für [Visual Studio Code](https://code.visualstudio.com/). -[![Version](https://vsmarketplacebadge.apphb.com/version/serpen.vbsvscode.svg)](https://marketplace.visualstudio.com/items?itemName=serpen.vbsvscode) +[![Version](https://Serpen.gallerycdn.vsassets.io/extensions/serpen/vbsvscode/1.2.1/1620233782061/Microsoft.VisualStudio.Services.Icons.Default)](https://marketplace.visualstudio.com/items?itemName=serpen.vbsvscode) [![Build status](https://ci.appveyor.com/api/projects/status/0i0hrbt657y8geef?svg=true)](https://ci.appveyor.com/project/Serpen/vbs-vscode)