Listview

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
euras
Posts: 429
Joined: 05 Nov 2015, 12:56

Listview

06 Nov 2017, 07:32

I try to create a code which will hold information about .csv file in Listview columns. Let's say we are creating a new .csv file with a content in a file and some extra information which should not be in the file like "Group" or "Status". I want to place that information in Listview columns and attach that information to that file somehow. I stuck right now on "attaching" part. In my code you can see that every new file will overwrite the old Columns in to the newest one. I try to figure it out how to "save" that information..

Code: Select all

Gui, Add, Combobox, vgroup r3, Texas|New York|London
Gui, Add, Combobox, x+10 vcombo r3, Pending|Completed|Rejected
Gui, Add, Button, x+15 gSubmit, Submit
Gui, Add, ListView, x5 y+5 r20 w330 h148 Grid -Multi +AltSubmit vMyListView, FileName|Group|Status
LV_ModifyCol()
Gui, Show, Autosize
return
Submit:
Gui, submit, nohide
entry=%group%;%combo%
FileAppend, 
(
%entry%`r`n
), %A_ScriptDir%\%group%%combo%%A_MSec%.csv
Sleep, 1000
Gui, Listview, MyListView
loop, %A_ScriptDir%\*.*csv
LV_Delete()  ; Clear the ListView, but keep icon cache intact for simplicity.
GuiControl, -Redraw, MyListView  ; Improve performance by disabling redrawing during load.
Loop %A_ScriptDir%\*.*csv
{
    LV_Add("", A_LoopFileName, group, combo)
}
GuiControl, +Redraw, MyListView  ; Re-enable redrawing (it was disabled above).
LV_ModifyCol()
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb and 374 guests