IcyFire Posted September 16, 2005 Share Posted September 16, 2005 how do u add a config file , that people can obveously edit to change the program to there specific ways? Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted September 16, 2005 Share Posted September 16, 2005 check out IniWrite in the helpfile [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
IcyFire Posted September 16, 2005 Author Share Posted September 16, 2005 how do u write one , i cant find out how Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted September 16, 2005 Share Posted September 16, 2005 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 More sharing options...
Moderators SmOke_N Posted September 16, 2005 Moderators Share Posted September 16, 2005 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 workYour 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now