Sign in to follow this  
Followers 0
IcyFire

config file

5 posts in this topic

how do u add a config file , that people can obveously edit to change the program to there specific ways?

Share this post


Link to post
Share on other sites



check out IniWrite in the helpfile ;)


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

Share this post


Link to post
Share on other sites

how do u write one , i cant find out how

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0