NikLok Posted June 16, 2008 Share Posted June 16, 2008 May be make feature to set delemiter symbol in IniRead construction? And i often read and save value from/to ini file in format: <NameValue>="Value" May be make iniread and iniwrite support format string ?! Link to comment Share on other sites More sharing options...
weaponx Posted June 16, 2008 Share Posted June 16, 2008 May be make feature to set delemiter symbol in IniRead construction? And i often read and save value from/to ini file in format: <NameValue>="Value" May be make iniread and iniwrite support format string ?! What is simpler that ini format? [section] key1=value key2=value XML: <section> <key1>value</key1> <key2>value</key2> </section> -or- <section key1="value" key2="value"/> Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 16, 2008 Share Posted June 16, 2008 (edited) May be make feature to set delemiter symbol in IniRead construction?And i often read and save value from/to ini file in format:<NameValue>="Value"May be make iniread and iniwrite support format string ?!Already been done, it's called an XML file: <NameValue="Value"/> Edited June 16, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 16, 2008 Share Posted June 16, 2008 (edited) <NameValue="Value"/> Make sure your / is on the right end. Edited June 16, 2008 by Richard Robertson Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 16, 2008 Share Posted June 16, 2008 <NameValue="Value"/>Make sure your / is on the right end. It is... I don't know what you mean... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
NikLok Posted June 16, 2008 Author Share Posted June 16, 2008 For example ini file:; +++++++++++++++++++++++++++++++++++++++++; BS Post Installer answers file V2.0; this text auto generated; Do not modify manually!!!; +++++++++++++++++++++++++++++++++++++++++[Common_Info]Ver=2.0Autor=LNM 2008Date=16.06.2008CRC=1420609834[selected_Items]installitem_618installitem_615installitem_600installitem_590installitem_360installitem_820installitem_800installitem_380installitem_290installitem_040installitem_410installitem_300installitem_278installitem_277installitem_276installitem_270installitem_260installitem_780installitem_058installitem_034installitem_030I want get all number of installitem, but i don't want make big script with regular expression and so on! Link to comment Share on other sites More sharing options...
weaponx Posted June 16, 2008 Share Posted June 16, 2008 Well the problem here is that none of those keys have values. This script would work but no values = no go. $file = "test.ini" $array = IniReadSection($file,"Selected_Items") If NOT @ERROR Then For $X = 1 to $array[0][0] ConsoleWrite($array[$X][0] & " = " & $array[$X][1] & @CRLF) Next Else ConsoleWrite("ERROR" & @CRLF) EndIf Link to comment Share on other sites More sharing options...
NikLok Posted June 16, 2008 Author Share Posted June 16, 2008 (edited) Thanks! Writing without value will be without symbol '=' or not ? Need that without him!!! Edited June 16, 2008 by NikLok Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 16, 2008 Moderators Share Posted June 16, 2008 Thanks! Writing without value will be without symbol '=' or not ?Need that without him!!!Then you're not creating an Ini file, you're doing some other monstrosity that would involve you writing your own methods of string manipulation.Just write the "=" after the insert, and leave the value blank.IniReadSection will then give you the keys that you can siphon through. 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