Results 1 to 4 of 4
  1. #1
    bepokemon's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    47
    Reputation
    10
    Thanks
    5

    Exclamation How to load Settings from my .INI when Opening my Injector?

    Hello MPGH, well, my question is, how do I load the Settings saved on a .INI file?
    I made a script that saves the settings, the options in my Injector, like "Close After Injection" in an INI file.
    The INI file then looks like this:

    FPS Injector Settings Coded by bepokemon


    [Inject Settings]

    closeafterinjection = yes
    injectmanually = no
    autoloadfolder = yes

    [Process Settings]

    crossfire.exe
    But I don't know how to make it Load this Settings when opening the Injector.
    It was something like this.

    If "closeafterinjection = yes" Then
    CheckBox1.Checked = True
    End If
    I don't know if this works and where to put this.
    Also, crossfire should be placed, writen in TextBox1.
    Close After Injection is CheckBox1,
    Manual Injection is CheckBox2 and
    Auto Load Folder is CheckBox3.
    Thanks for whoever help me, please!

  2. #2
    mmook's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    goooooooood

  3. #3
    Codemunkie's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    England :D
    Posts
    219
    Reputation
    25
    Thanks
    755
    My Mood
    Bored
    First of all, if you're going to use an ini file, it's alot easier to use 0 and 1 for true and false It makes it look neater too.

    There's an easier way to save settings however, using the built in Settings() function. If you want more information, visit this tutorial (Step 2).

    If you still want to use an ini file though, you'd use a StreamReader. Then from there you can pick out strings to find and see if they're set to 0 or 1. Read on it here.
    [IMG]https://i789.photobucke*****m/albums/yy172/Codemunkie/sig-logo.png[/IMG]

  4. #4
    bepokemon's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    47
    Reputation
    10
    Thanks
    5
    Quote Originally Posted by Codemunkie View Post
    First of all, if you're going to use an ini file, it's alot easier to use 0 and 1 for true and false It makes it look neater too.

    There's an easier way to save settings however, using the built in Settings() function. If you want more information, visit this tutorial (Step 2).

    If you still want to use an ini file though, you'd use a StreamReader. Then from there you can pick out strings to find and see if they're set to 0 or 1. Read on it here.
    Thanks, see if I did good in my way.
    FPS Injector Settings Coded by bepokemon


    [Inject Settings]

    closeafterinjection = yes
    injectmanually = no
    autoloadfolder = yes

    [Process Settings]

    crossfire.exe
    With StreamReader I used the Contains. So the code was like this:
    Code:
    If Reading.Contains("closeafterinjection = yes") Then
               CheckBox1.Checked = True
              End If
    Thanks for your help.
    #Request Solved
    @Liz, @Ghost

Similar Threads

  1. [Solved] How to load Settings from my .INI when Opening my Injector?
    By bepokemon in forum CrossFire Help
    Replies: 2
    Last Post: 07-08-2011, 07:34 AM
  2. .DLL file get settings from .INI file
    By zooSz in forum C++/C Programming
    Replies: 7
    Last Post: 04-01-2011, 06:02 PM
  3. [TuT] Save/Retrieve settings from .ini [Need critiques]
    By Jason in forum Visual Basic Programming
    Replies: 5
    Last Post: 07-01-2010, 01:25 AM
  4. TUTORIAL - How to prevent Warrock from crashing!
    By Darky in forum WarRock - International Hacks
    Replies: 25
    Last Post: 07-06-2007, 09:31 PM
  5. (Request) A tutorial on how to extract addresses from trainers
    By englishpom in forum WarRock - International Hacks
    Replies: 9
    Last Post: 05-19-2007, 10:14 PM