Jump to content

Recommended Posts

Posted

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.

Posted (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 by furrycow
Instant Lockerz Invite - www.instantlockerzinvite.co.uk

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
×
×
  • Create New...