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.
nice trick thnxReplyDelete
sai: Its working, thanks man.ReplyDelete
what does Asc mean and what are the values 32,48,57ReplyDelete
Asc Function in VB Scripting is used to return the character Ascii Code for the character.Delete
The Asc function converts argument to ANSI code.
please refer for details -
for all programs we can write like thisReplyDelete
I think its not possible , its only for vb scripting , and file system , excel .. ectReplyDelete
What does myNumber does here.Can anyone explain the function in does here
myNumber is a variable to store the Numeric values which come from the string.Delete
How to identify Web elements (link,button) and write scripts and execute without using qtpReplyDelete
Thanks for the valuable information and insights you have so provided here... ingilizce kursuReplyDelete
Since the torment more often than not gradually exacerbates, the patient will most likely be unable to demonstrate a particular time when damage occurred. Swelling over the site of damage is exceptionally normal. how to prevent stress fracturesReplyDelete
Wow i can say that this is another great article as expected of this blog.Bookmarked this site.. beşiktaş ingilizce kurslarıReplyDelete
Very useful post. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up. quizzesReplyDelete
I was surfing the Internet for information and came across your blog. I am impressed by the information you have on this blog. It shows how well you understand this subject. z code system discountReplyDelete
Great post, you have pointed out some fantastic points , I likewise think this s a very wonderful website. buy real instagram likes without paypalReplyDelete