
September 2nd, 2008 by

daniva

Loading ...
Dealing with the many differing locale specifics is a major challenge when testing Web or multi-language applications that will be used in multiple countries. It’s becoming increasingly important, with the release of technologies such as Windows 2000, to be able to support these scenarios. The new locale features in VBScript are a small step toward making that easier, and we’re working hard on the next release of Windows Script to make it even easier. Once you know your Locale it’s possible to change the behavior of Locale functions with the new locale features using VBScript.

May 3rd, 2008 by

Meir Bar-Tal

Loading ...
Sometimes a numbered list is required, such as a list to populate a ListView, TreeView or one to create sequential files in a folder. One of the main problems is that such lists typically sort the items lexicographically, so that numbered items end-up in the wrong order, such as File_1, File_10, FIle_11, …, File_2, FIle_20, […]

April 1st, 2008 by

daniva

Loading ...
GUID (global unique identifier) is a term used by Microsoft for a number that its programming generates to create a unique identity for an entity such as a Word document. GUIDs are widely used in Microsoft products to identify interfaces, replica sets, records, and other objects. Different kinds of objects have different kinds of GUIDs - for instance, a Microsoft Access database uses a 16-byte field to establish a unique identifier for replication.

April 1st, 2008 by

daniva

Loading ...
Sometimes we need to generate a random string to use in our tests. The following code generates a random string of alpha characters. You can extend the function to generate additional strings.

April 1st, 2008 by

daniva

Loading ...
Adds quotes to a filename… especially useful when sending an argument to a program (ie a filename) and it has spaces in it (with spaces if shows up as multiple arguments.

April 1st, 2008 by

daniva

Loading ...
The following function formats messages, using the Dot.Net format principle.

April 1st, 2008 by

daniva

Loading ...
Use the LCase function and to convert a string to lower-case.
Use the UCase function and to convert a string to upper-case.

April 1st, 2008 by

daniva

Loading ...
Use the LTrim, RTrim, and Trim to trim whitespace from a string.

April 1st, 2008 by

daniva

Loading ...
The string operator & performs a string concatenation also the + operator.

April 1st, 2008 by

daniva

Loading ...
Use the Space and String to create a string having a single character repeated N times.

April 1st, 2008 by

daniva

Loading ...
Use the StrComp function and vbTextCompare argument to compare strings without case sensitivity.

April 1st, 2008 by

daniva

Loading ...
Use the Right Function to extract a substring from the end of a string.

April 1st, 2008 by

daniva

Loading ...
Use the Mid Function to modify a substring within a string

April 1st, 2008 by

daniva

Loading ...
Use the Len Function to return the length of a string.

April 1st, 2008 by

daniva

Loading ...
Use the Left Function to extract a substring from the beginning of a string.

April 1st, 2008 by

daniva

Loading ...
Use IsDate to determine if a string contains a valid date.

April 1st, 2008 by

daniva

Loading ...
Find the starting position of the last occurrence of a substring within a string. ( With strings, the first character is at position 1 )

April 1st, 2008 by

daniva

Loading ...
VBScript has no built-in function where we can find all occurrences of a substring inside a string. Only regular with expressions ( Regexp ) the task is easier. However you need to use Regexp, Matches, and Match objects.

April 1st, 2008 by

daniva

Loading ...
Use the CItn function to Determine if a string contains a substring.

April 1st, 2008 by

daniva

Loading ...
Use the CStr to convert a number into it’s string representation

April 1st, 2008 by

daniva

Loading ...
The Asc function takes an ASCII character code and returns the character.

April 1st, 2008 by

daniva

Loading ...
The Asc function returns the ASCII code of the first character in the string.
Recent Comments