what I have the most difficulty is in creating the "Button" script to add the variables to the list.
something more or less like this:
Code: Select all
#SingleInstance, Force
Gui +AlwaysOnTop
; Create the ListView with two columns, Name and Size:
Gui, Add, ListView, r20 w300 h300 gMyListView, Name|Size (KB)
Gui,Add,Text, w180 h20,INSERT NEW ITEM ON LIST:
Gui, Add, Edit, w150 h20, Name
Gui, Add, Edit, w150 h20, Size
Gui,Add,Button, w80 h20, ADD
; Gather a list of file names from a folder and put them into the ListView:
Loop, %A_MyDocuments%\*.*
LV_Add("", A_LoopFileName, A_LoopFileSizeKB)
LV_ModifyCol() ; Auto-size each column to fit its contents.
LV_ModifyCol(2, "Integer") ; For sorting purposes, indicate that column 2 is an integer.
; Display the window and return. The script will be notified whenever the user double clicks a row.
Gui, Show, Center w700 h450 ,
return
MyListView:
if (A_GuiEvent = "DoubleClick")
{
LV_GetText(RowText, A_EventInfo) ; Get the text from the row's first field.
ToolTip You double-clicked row number %A_EventInfo%. Text: "%RowText%"
}
return