Results 1 to 31 of 31

Thread: [RESOLVED] Reading Data From Lines of .ini File

Threaded View

  1. #1

    Thread Starter
    Fanatic Member AceInfinity's Avatar
    Join Date
    May 2011
    Posts
    696

    Resolved [RESOLVED] Reading Data From Lines of .ini File



    Here's what i've got so far, i've written all of the data that i'm going to put into my config file, however i'm having trouble reading the specific string values that I need from that ini file. The parts of the ini lines I want to get are the values in between the ' ' in value='____'.

    I've tried using streamreader a couple things but i'm having trouble figuring that out. I need to parse each line of the ini file to get that value in between the single quotations, so that I can set the value for my richtextbox background and text color as well as a few other things that i've set up in my notepad including tab spacing and so on. Help would be much appreciated because lots of these different values need to be converted from a string value to integers, and boolean values as well. (4 of them, the rest of them don't have to be changed because they are already string values when my application reads them to determine it's application load settings.

    EDIT: I just noticed in the preview that this is from the version of the app where I had streamwriter write "______ value=" & Something to a file. lol some of the (')s are still in this version, so please excuse that little part. I had them in, but took them out so that I could trim data to get a value easier, but I want to use (')s hopefully when all is said and done.

    For example, just to restate what I want - in the ini file it will read
    [setting name] value='VALUE'

    I want to be able to "get" the string value of "VALUE" within the ini file between the 2 single quotations ' & '.

    Thanks
    Last edited by AceInfinity; May 23rd, 2011 at 12:56 AM.

Tags for this Thread

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