Results 1 to 2 of 2

Thread: Executing code from a file [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Lively Member deranged's Avatar
    Join Date
    Jun 2004
    Location
    TN
    Posts
    104

    Question Executing code from a file [RESOLVED]

    Some of you that play on Battle.net may be familiar with the famous bot written in VB6 called StealthBot. This bot shows a great example of what I would like to do. I would like to save information in a .ini file, and retrieve it later for use.

    Saving the information is the easy part, tha'ts done. Onto retrieval. StealBot comes with a file called definitions.ini. In it is some word definitions (I suppose it's for an auto-correct feature or something) anywho, inside is some information that the program reads. Example:
    Code:
    [Def]
    TacoBell=Pure greatness.
    MadFrog=An angry frog.
    3dFX's Mom=A dirty hoe
    Everything that is under [Def] is known to the program as a definition, and the program does things accordingly to any info under it.

    I want to know how to go about doing this. I am making a progam where I want it to take an ini file with information like seen here:
    Code:
    [Name]
    Donna
    Jeff
    Sarah
    
    [GPA]
    2.0
    4.0
    1.5
    I want to read all as text (so no need in converting the numbers to strings). The number of lines under [name] will change, as will the number of lines under GPA.

    I know that it would be better (and probably easier) to save them as arrays, having an array for gpa and an array for name. But, how do I get only the information under [name] into the dimensions of name array etc.

    Thank you for any help.
    Last edited by deranged; Mar 23rd, 2005 at 05:39 AM.

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