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
What is event handling in vbscript?
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?
hi all, i had a question, that how to find out hiding a coloumn in a table i had a table having the following column names NAME DESCRIPTION CREATED TIME CREATED USER if i right clicked on a NAME column it will displays a menu having the same column names in a list like NAME DESCRIPTION CREATED TIME CREATED USER with check boxes.if i unched any check box, that column name should not be appear in the main table column names could anyone please solve this problem?
Explain a few date functions in vbscript
What is the technology used by vb script?
How can you destroy an object in vbscript?
Is vbscript language a case-sensitive language and what does it mean?
What is vbscript language used for and which earlier language is it modeled upon?
Is vbscript a case-sensitive or case-insensitive?
What are the environments supported by vbscript language?
What are class variables?
Both Static and dynamic arrays are handled by VB script. Is it true?
How will you release the memory acquired by an array variable in vbscript?
Explain some uses of vb script?
Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)