Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a program to print all lines that contains a word either “testing” or “qtp”

Answer Posted / syamala usha

set fso = createobject("scripting.filesystemobject")

set f=fso.opentextfile("C:
otes HP.txt",1)


Do until f.atendofstream

str=f.readline

a = split(str," ")

flag=0

for j = 0 to ubound(a)

if (a(j) = "testing") or (a(j) = "qtp") then

flag=1

exit for

end if

next

if flag=1 then

msgbox str

end if

loop

f.close

set f= nothing

set fso =nothing

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Enter Values on the Command promt using VB script

2054


how to set one column as primary key in QTP and fetch values accordingly

2317


How will you get the smallest subscript of an array in vbscript?

1367


What is the difference between javascript and vbscript?

1161


What is the difference between do until loop and do while loop?

1049


Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.

2028


How to pass argument by reference to a function in vbscript?

1054


Mention what is the technology used by vb script?

973


What is the difference between a dictionary and an array?

1056


How do i automate a website www.flyashx.com without having any test cases witin a week time.

1906


Explain a few date functions in vbscript

981


Explain vbscript in detail?

1052


How you can call vbscript functions?

1079


what is the use of QCUtil? explain with one example?

7056


Which operator can be used to change the value of the operand or change the state of the condition?

1026