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 / amit

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




Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")




Set objFile = fso.OpenTextFile("C:UsersAmit MoolchandaniDesktop est.txt",1,True)












Do While objFile.AtEndOfStream <> True
str = objFile.ReadLine
If Instr(1,str,"Testing",1) Or Instr(1,str,"qtp",1) Then
Print str
End If




Loop




objFile.Close




Set objFile = Nothing
Set fso = Nothing

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi this is Vinoth. I need a help on below mentioned question A combobox contains list of items assume as 5 I have to get each items Individually and I have to Export to datatable. Please help me on this. Thanks

2086


hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?

2286


Explain the support of asp for vb script functionality?

1013


If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?

1968


Out of the different type of operators, which are evaluated first and last in the vbscript language?

953


who will create the object?

2130


how to acces the remote mechine using vb cript(QTP)

1968


what is event handling?

943


When does ‘on click of button’ event gets triggered in the vbscript language?

940


How can the spaces from the string be removed?

956


What is the purpose of folders object of scripting.filesystemobject class in vbscript?

1312


what is the differance between BYVAL,BYREF?

2218


did any one attended interview in applabs if you had gone through plz tell me the procedure

2209


What is the scope of a constant declared using public?

915


Mention characteristics of sub procedures?

992