Jump to content

config file


IcyFire
 Share

Recommended Posts

THE HELPFILE!

C:\Program Files\Autoit3\Autoit3help.exe

IniWrite("C:\Temp\myfile.ini", "section2", "key", "this is a new value")
---------------------
IniWrite ( "filename", "section", "key", "value" )

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Link to comment
Share on other sites

  • Moderators

I think he was asking how to write an .ini B3TA.

In the example scripts and form provided by the helpfile, it would look something like this for IniWrite()

So first you would open Notepad, Save as MyIni.ini and then instead of save as Text Documents save as All Files, then click save.

IniWrite(@DeskTopDir & "\MyIni.ini", "Section1", "Key_One", "MyValue")

Using the DeskTopDir so you can easily switch to your desktop to check your work

Your ini file directory and name: @DeskTopDir & "\MyIni.ini"

Section (what part of the ini do you want to search: "Section1"

Key (What are you looking for (variable) in that section): "Key_One"

Value = What value you want to put for [section1][Key_One], "MyValue"

Your Ini File would then look something like this setting it up. (Be sure to use the Brackets, they seperate the other sections)

[section1]

[section2]

[section3]

After using IniWrite, the end result would look like this:

[section1]

Key_One=MyValue

[section2]

[section3]

Now you can venture to use IniRead() and search for the desired values using basically the same method of Search "Section1", "Key_One".

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...