Results 1 to 7 of 7

Thread: Reading a text file...

  1. #1

    Thread Starter
    Addicted Member _Yoyo's Avatar
    Join Date
    Apr 2001
    Location
    Dominican Republic
    Posts
    187

    Unhappy Reading a text file...

    How can i search for an especific word on a text file and then begin to read the line after or the character right after the word (or tag or keyword or however you wanna called) we recently found?
    Can that be one without API's?
    The biggest man you ever did see was once just a baby.

    Bob Marley

  2. #2
    Megatron
    Guest
    Code:
    Open "MyFile" For Input As #1
    sFile = Input(LOF(1), 1)
    Close #1
    
    nPos = InStr(1, sFile, "<KEYWORD>")
    If nPos Then
        sFile = Right(sFile, Len(sFile) - nPos)
    End If

  3. #3
    jim mcnamara
    Guest
    Code:
    Function  strRead(channel as long,searchStr as string) as String
      Dim tmp as String, p as long
      tmp = Input(Lof(channel),channel)
      p = instr(tmp,searchStr)
      If p = 0 then 
         strRead = ""
      Else
         strRead = mid(tmp,p+1)
      End If
    
    End Function

  4. #4

    Thread Starter
    Addicted Member _Yoyo's Avatar
    Join Date
    Apr 2001
    Location
    Dominican Republic
    Posts
    187
    How would you read all the values listed in the conlum "Martes" after copying this table from a web page to a txt file and having for instance the "<TABLE>" tag as a keyword?
    Attached Images Attached Images  
    The biggest man you ever did see was once just a baby.

    Bob Marley

  5. #5

    Thread Starter
    Addicted Member _Yoyo's Avatar
    Join Date
    Apr 2001
    Location
    Dominican Republic
    Posts
    187
    Any one? Here it is:
    [IMG]C:\Mis Documentos\Table.gif[/IMG]
    The biggest man you ever did see was once just a baby.

    Bob Marley

  6. #6

    Thread Starter
    Addicted Member _Yoyo's Avatar
    Join Date
    Apr 2001
    Location
    Dominican Republic
    Posts
    187

    Thumbs down So...

    So it's a fact: NO ONE IS GOING TO HELP ME OUT
    The biggest man you ever did see was once just a baby.

    Bob Marley

  7. #7
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    read the info into a txt file and attach the file and what you want out of it as a zip...
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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