Posts

Showing posts from July, 2012

Useful Code snipptes - VBScript

Image
VBScript data structures

Vbscript lacks support of complex data structures unlike other programming languages. This sometimes make life a bit difficult. We need to code our own algorithms to achieve simple tasks like sorting of an array or reversing it. .net has support for complex data structures which come with build-in functions for these simple tasks. So if we can use .net data structure then we can save reinvention of wheel for some of these tasks. Well the good news is some of .net libraries are exposed to COM and can be used in vbscript.

Below are some examples:

ArrayList:


Set objArrayList = CreateObject("System.Collections.ArrayList")

objArrayList.Add 6
objArrayList.Add 8
objArrayList.Add 2
objArrayList.Add 4
objArrayList.Add 1
objArrayList.Add 5
objArrayList.Add 3
objArrayList.Add 3
objArrayList.Add 7

'unlike redefining array size (redim statement) every time before appending an element into an array,
' with arraylist you don’t need to worry about that.

'Converting Arr…

Free QTP book - "Technology Specific Guide for QTP"

Image
After loads of comments and feedback filling our inbox , we decided to giveaway three copies of the book - "Technology Specific Guide for QTP" for free.


No need of hunting for free QTP ebooks or QTP tutorials or QTP interview questions or QTP certification !

So how do you get a free copy?

Click Here to know more..

TSGQTP - Now at a discounted price

Image

TSGQTP - Update

Image