polps Posted March 29, 2010 Share Posted March 29, 2010 Hello again, I am having some trouble with IniRead and IniReadSection functions. The INI file has a lot of section like this (I receive it and maybe it is not a standard INI file); [sECTION1] KEY1 = .... KEY2 = STRING1, STRING2, STRING3, STRING4, STRING5 KEY3 = ... The KEY2 is not read correctly (note that it is written in two records) because only the first part is detected by the function, and return the following result: KEY2 = STRING1, STRING2, STRING3, There are a workaround to detect also the STRING4, STRING5 part? Thanks again. Link to comment Share on other sites More sharing options...
furrycow Posted March 29, 2010 Share Posted March 29, 2010 (edited) Just a thought - havent tried this, but...StringReplace(FileRead("YOUR INI FILE DESTINATION"),", "&@LF,", ")...And then do you IniRead()Don't hold me to this in the slightest!EDIT:Ok, so just tried this...$INI=FileRead("\YOUR INI FILE DESTINATION") MsgBox(0,"BEFORE",$INI) $INI=StringReplace($INI,","&@CRLF,", ") MsgBox(0,"AFTER",$INI)You would then need to write the string back in to the file again, before using IniReadSection() Edited March 29, 2010 by furrycow Instant Lockerz Invite - www.instantlockerzinvite.co.uk Link to comment Share on other sites More sharing options...
polps Posted March 30, 2010 Author Share Posted March 30, 2010 Thank you furrycow, it work perfectly! 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