How do u retrieve data from a text file into different
variables. i.e.
in a text file named "source" , the data is like :
india,1000,japan,200,china,50,singapore,45050
this is given in the first line of the text file.
in the second line of the text file the dta is:
sun,moon,planet,river,earth,water
if u use "readline" method by using FSO concept u can
retrieve the entire line in to a variable. but i want to
import each field (ex: "india" in one variable, "1000" in
another variable etc..). Apprecitae proper replies.
Answer Posted / vipin eden ispl
set fso=createobject("scripting.filesystemobject")
set f=opentextfile(path,1)
set a=new regexp
a.pattren="[a-z]+|(\d)+"
a.ignorecase=true
a.global=true
do while f.atendofstream <>true
r=f.readline
set b=a.execute(r)
for each val in b
msgbox val
next
loop
f.close
dz will get u much information later u can modify as per ur
requriment.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to data driven test for Win objects in QTP ?
How to use the object spy in quicktest professional (qtp) 8.0 version?
Explain about datafile/verification of date file when file is not available in local system?
how to find that tools work well with ur existing system?
i'm testing the webpage with QTP, in this wabpage i have to choose the CV from the window, but QTP can't recognize the object, so i used the Low LEvel Recording, but every time i run the test, QTP go to halt when it gets to the Recorded part, any solution for that?( except puting delay in the script and manuall selecting, because i've did that)
WHAT IS THE DIFFERENCE BETWEEN QTP SCRIPT AND VB SCRIPT? HOW MUCH PERCENTAGE WE USE IN QTP SCRIPT REAL TIME AND HOW MUCH PERCEN OF VB SCRIPT,,,,,,,
can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?
what are the utilities and drivers
Can launch two instances of qtp on the same machine?
what is profile tool?
Explain data driven framework?
If the objects hierarchy is changing from build to build, then how you will handle that condition?
could any help me please, how to work on visual foxpro application using UFT
How many ways we can parameterize data in quicktest professional?
What Folder Structure following in Keyword Driven Frame work?