SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Advanced Member
    Join Date
    Mar 2002
    Location
    Earth, USA, New York, Western
    Posts
    759
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Will only read one line from the input file

    while (FileReadLine (hFile, sMailData)) is not doing it for each line of the input file. How do I tell it to go on to the next line and add each string to the list and add the list to the master list of list?

    Thanks,
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> [+] LIST OF LIST OF STRING ParseMailFile ()
    [ ] STRING sElement, sLine, sMailData
    [ ] HANDLE hFile
    [ ] LIST OF STRING lsMailData = {}
    [ ] LIST OF LIST OF STRING llsMailData = {}
    [ ] rMail Mail
    [ ]
    [ ] hFile = FileOpen (csDataDir+&quot;Mail.txt&quot;, FM_READ)
    [-] while (FileReadLine (hFile, sMailData))
    [ ] ListAppend(lsMailData, GetField(sMailData, &quot;,&quot;, 1))
    [ ] ListAppend(lsMailData, GetField(sMailData, &quot;,&quot;, 2))
    [ ] ListAppend(lsMailData, GetField(sMailData, &quot;,&quot;, 3))
    [ ] ListAppend(lsMailData, GetField(sMailData, &quot;,&quot;, 4))
    [ ] ListAppend(lsMailData, GetField(sMailData, &quot;,&quot;, 5))
    [ ] ListAppend(lsMailData, GetField(sMailData, &quot;,&quot;, 6))
    [ ] ListAppend(lsMailData, GetField(sMailData, &quot;,&quot;, 7))
    [ ]
    [ ] ListAppend(llsMailData,lsMailData)
    [ ]
    [ ] FileClose (hFile)
    [ ] return llsMailData
    [ ]
    </pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Bruce.

  2. #2
    Advanced Member
    Join Date
    Mar 2002
    Location
    Earth, USA, New York, Western
    Posts
    759
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Will only read one line from the input file

    Thanks, much cleaner too.

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Will only read one line from the input file

    I need to clean up and post on AmeliorTech.com some classes I wrote that make working with text files easier. Something for late some night.

    - Dave
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Will only read one line from the input file

    Okay, I posted a rough version out there for your amusement. Something to play with.

    AmeliorTech SilkTest Classes

    Bon chance.

    - Dave
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Will only read one line from the input file

    I can't see anything wrong with yoru code. Should be getting one line, hacking stuff out, then going on to the next. FileReadLine should only return a FALSE when it gets to the EOF marker.

    Something to try:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
    ListRead (lsFullFile, csDataDir+&quot;Mail.txt&quot

    for each sMailData in lsFullFile
    // do your GetField parsing</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Might want to make sure that SilkTest sees multiple lines in that file, too.

    - Dave
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:34 AM.

Copyright BetaSoft Inc.