jimmer Posted February 26, 2005 Posted February 26, 2005 hello, I have absolutely no idea on how to associate iniread with variables...I have no idea how to start it off$var = IniReadSection("C:\Configurations.ini", "Req")If @error Then MsgBox(4096, "", "Error occured, probably no INI file.")Else For $i = 1 To $var[0][0] MsgBox(4096, "", "Key: " & $var[$i][0] & @CRLF & "Value: " & $var[$i][1]) NextEndIfIf $Req = 1 ThenSleep(5000)EndIfI have no idea how to retrieve the value of the variable... =\Thanks ~
Guest Guidosoft Posted February 26, 2005 Posted February 26, 2005 (edited) hello, I have absolutely no idea on how to associate iniread with variables...I have no idea how to start it offI have no idea how to retrieve the value of the variable... =\Thanks ~<{POST_SNAPBACK}>$Variable = INIRead("File","Section","SPECIFICSETTING!!!","Default text if it don't find nothing")Don't get it all at once.Just retrieve from the INI as you need.Edit: Wait I see what your trying to do. One seccond, i don't know about this. Edited February 26, 2005 by Guidosoft
buzz44 Posted February 26, 2005 Posted February 26, 2005 (edited) IniWrite ( "filename", "section", "key", "value" ) you were missing a parametre read the help file .... $File = "test.ini" $Section = "This is a test" $Key = "Test key" Iniwrite ($File,$Section,$Key,"Did the test work?") $work = IniRead ($File,$Section,$Key,"No it didnt") MsgBox(0, "", $work ) you are reading all the ini at once ... if u just want to read ONE varible use wat i did above ... in ur 1st post.... make sure u actaully have an ini file located in C:\temp\myfile.ini other wise it will say "Error occured" blah blah .. your ini file should look something like [Section2] Key1= Did Key2= This Key3= Work? Edited February 26, 2005 by burrup qq
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