Ini to Listview problem Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Mightykiller
Posts: 57
Joined: 09 Oct 2017, 13:34

Ini to Listview problem

03 Nov 2019, 17:57

My ini file contains:
1
2
3
4
5
What i get in my listview is:
12345
i want each value to be on a line in my list view, i cant get it to work.

Code: Select all

IniRead, BanListData, %A_ScriptDir%\BanList.ini,Data
BanList:
Gui, 2: default
Gui, 2: Add, Button, gAddToBanList x84 y36 w80 h23, Add
Gui, 2: Add, Button, gDelete x176 y36 w80 h23, Delete
Gui, 2: Add, Button, gReset x132 y296 w80 h23, Remove All
Gui, 2: Add, ListView, vBannedList x72 y80 w200 h198, Banned Users

Loop, Parse, BanListData,`n,
LV_Add("", BanListData)
Gui, 2: show, w346 h330, Ban List
return
User avatar
boiler
Posts: 16920
Joined: 21 Dec 2014, 02:44

Re: Ini to Listview problem

03 Nov 2019, 18:15

Can you show the actual contents of your ini file? Is that really it? Just 5 numbers, each on a new line with no headers or anything? If so, try replacing the first line with this:

Code: Select all

FileRead, BanListData, %A_ScriptDir%\BanList.ini
User avatar
boiler
Posts: 16920
Joined: 21 Dec 2014, 02:44

Re: Ini to Listview problem  Topic is solved

03 Nov 2019, 18:22

Actually, your main problem is that you need to change the LV_Add line to this:

Code: Select all

LV_Add("", A_LoopField)
Mightykiller
Posts: 57
Joined: 09 Oct 2017, 13:34

Re: Ini to Listview problem

04 Nov 2019, 17:59

Code: Select all

LV_Add("", A_LoopField)
Thank you.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Google [Bot], mikeyww, Nerafius, scriptor2016 and 83 guests