Results 1 to 2 of 2

Thread: Opening Certain Line of a file, to a position

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Posts
    482

    Question

    Hey,

    i have a program, and i saved MANY lines to a file..
    All i need now, is to open the file to where it needs to go..


    I need a way, to open a file and Get a certain line out of it, and place that line into the place i want it to go..

    EXAMPLE:

    Hey There
    Yo
    What up

    Get the 1st line of the Text file, ("Hey There") and put it into Text1.text (or anywhere else i want)

    Or it could be line 100, or 30 ..ect

    THANKS! (BTW: someone told me a way of using a listbox, but i want a better way (without using too many controls)

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You could try looping through it line by line until you get to the one you want. The problem with text files is that there's no way to quickly bypass a set of characters.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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