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
Mention what are the rules to name variable in vbscript?
What is the use of the date function in the vbscript language?
Mention how to access array data?
while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans
How will you release the memory acquired by an array variable in vbscript?
Why is it recommended to close the database connection every time after the work is completed?
Which operator is used to concatenate the 2 values in the vbscript language?
What is event handling in vbscript?
how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me
What is the difference between a dictionary and an array?
wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......
When to use function procedures and what are its characteristics?
How to make sure that items in a wintree are sorted al?
Mention what is vbscript procedures?
Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.