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 the features of visual basic?
Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?
how to write validation function for date in vb script
What are the 2 ways in which a variable can be declared in the vbscript language?
Difference between dim,public and private variables in vb script?
How will you compare two strings in vbscript?
Which operator is used for fetching the modulus of the 2 numbers in the vbscript language?
What is the difference between javascript and vbscript?
Develop a parameterized action that accomplishes the following a. Launch a browser of users choice ( example : IE, chrome etc) b. Open up a search engine (Google, Bing etc) c. Perform a search d. Click a particular link depending on the user’s choice ( 1st , 2nd or third link)
Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?
What is the use of the instr function?
How can you create an object in vbscript?
How to take whole text output from screen of Bitmap Application.
Explain different types of segment?
Mention when to use function procedures and what are its characteristics?