Results 1 to 10 of 10

Thread: [RESOLVED] Parsing from text file to mainfraim application

Threaded View

  1. #8

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    67

    Re: Parsing from text file to mainfraim application

    Hmm...I think I'm doing something wrong still. If I use the code exactly like Al42 provided, it compiles & runs fine, but only looks at the first line & then moves on to the code that pulls out my tagged information (company name, etc.). So, I put a When statement around it similar to the code I was using from krckoorascic so that it would stop trying at the end of the file...but now it hits an infinite loop and I can't figure out why. I had to modify the code to fit my application...so maybe I screwed something up in the process? Unless I'm crazy, this should work...unfortunately, I think I'm crazy.

    VB Code:
    1. While Not EOF(ff)
    2.     select case True
    3.         Case Ucase$(Left$(row,13)) = "COMPANY NAME:"
    4.            compName = Mid$(row, 14)
    5.            OESOTS.Screen.Sendkeys(compName)
    6.          Case Ucase$(Left$(row,7)) = "QTY PIC"
    7.            Line Input #ff, row 'input the next line
    8.            Do While row <> "" 'keep doing it until a blank line
    9.              OESOTS.Screen.Sendkeys(Mid$(row,12,5)) 'send the 4 characters starting at the 10th position
    10.              Line Input #ff, row
    11.             Loop 'back to the 'Do' row
    12.     End Select
    13.   Wend


    By the way...the changes that might not make sense without seeing my whole code...I had to dim row as string instead of line like you guys had been using...not sure why, but it didn't like having a string named "line"...and the other change is I'm using 2 different sessions, so I left one with the standard sess0 name, but the one that this data goes to is named oesots now instead of sess0.
    Last edited by Bill-E-BoB; May 2nd, 2006 at 04:26 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width