INI write, read, display data

04/28/2016 15:46 LiveLong23#1
Hi

Im testing ini function and i have some problems with it. When i add item to ini file it owerite my first entry, and it dont show me items from ini on listview.

And i need instead of id to be username, password, nickname

Here is my code so far i tested


And items in ini file

[Account]
id=1234,1234
id=bah
id=afk
id=rwet
id=gtwddda
04/28/2016 17:10 alpines#2
Just use a number for the Ini-Loop. Something like
Code:
[Account]
1=user1,pass1
2=user2,pass2
04/28/2016 17:39 LiveLong23#3
But how to write to ini file when i must enter section and key, and 1,2 is keys.
04/28/2016 17:47 M3mphizzt#4
i found an old script thats not like yours but i think u can use some things from it
04/28/2016 18:17 LiveLong23#5
I have 3 columns

Code:
_GUICtrlListView_AddColumn($List1, "Username", 150)
_GUICtrlListView_AddColumn($List1, "Password", 145)
_GUICtrlListView_AddColumn($List1, "Nickname", 150)
and i try to populate it like this

Code:
Func __readIni()

	If FileExists($ini) Then
		$fOpen = FileOpen($ini)
		$fRead = FileRead($fOpen)
		$nItem = StringReplace($fRead, "[Accounts]", "")
		_GUICtrlListView_AddItem($List1,$nItem&@CRLF)
	EndIf

EndFunc
But i get only 1 line in 1st column

[Only registered and activated users can see links. Click Here To Register...]
04/28/2016 18:27 °Incinerate#6
Try this:


[Only registered and activated users can see links. Click Here To Register...]
04/28/2016 18:37 LiveLong23#7
Quote:
Originally Posted by °Incinerate View Post
Try this:


[Only registered and activated users can see links. Click Here To Register...]
This works fine, thank u. :handsdown: