CSV to ListView?

Get help with using AutoHotkey and its commands and hotkeys
User avatar
TheDewd
Posts: 1391
Joined: 19 Dec 2013, 11:16
Location: USA

CSV to ListView?

25 Feb 2014, 17:03

How can I take this example CSV and parse it into a ListView with three columns?

CSV:

Code: Select all

Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
User avatar
AlphaBravo
Posts: 476
Joined: 29 Sep 2013, 22:59

Re: CSV to ListView?

25 Feb 2014, 17:21

Code: Select all

data =
(
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
)
Gui, add, listview, w300 r10 , Name|Extension|Location
Gui, show
loop, parse, data, `n
{
    x:=[]
    loop, parse, A_LoopField, CSV
        x.Insert(A_LoopField)
    LV_Add("", x*)
}
LV_ModifyCol()
return
elmo
Posts: 97
Joined: 09 Oct 2013, 09:08

Re: CSV to ListView?

25 Feb 2014, 18:49

That is way cool AlphaBravo.

I had no idea you could drop an array on lv_add like that.

Thanks.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], JackMa, rpgfreak128 and 262 guests