Here we will see how to execute vbscipt code without having QTP on your machine!!
1. Just copy n paste below code to new notepad...
'To extract a number from alphanumeric text string
Dim mystring, myLength
mystring = "qtpschools567test12398ing"
myLength = Len(mystring)
For i = 1 To myLength
If Asc(Mid(mystring, i, 1)) <> 32 Then
If Asc(Mid(mystring, i, 1)) >= 48 And Asc(Mid(mystring, i, 1)) <= 57 Then
myNumber = myNumber & Mid(mystring, i, 1)
2. Save file as "test.vbs" (with double quotes)
3. It'll display like this on your hard drive..
4. Now close the file and double click on the file icon.
and it's done!! :)
Please note that it'll work only if you don't have any object in your script.
In case of any queries, plz post your comments.