Something like this ?
#include <GuiConstantsEx.au3>
#include <File.au3>
#include <Array.au3>
#include <ListviewConstants.au3>
#include <GuiListView.au3>
Local $FileList ;declare variables here, not in a loop
Local $DataReadFromList
$GUI = GUICreate("Automation", 300, 500) ;is good to save the window handle
$mylist = GUICtrlCreateList("", 10, 60, 280, 100)
$add = GUICtrlCreateButton("Add", 10, 35, 75, 20)
GUISetState(@SW_SHOW,$GUI) ;;;;
While 1
$msg = GUIGetMsg()
Switch $msg
Case $add
_FileReadToArray("C:\Users\Danny Tan\Desktop\test.txt", $FileList)
If @error Then ContinueLoop ;if file not found do something (else the program will generate error)
For $i = 1 To $FileList[0]
GUICtrlSetData($mylist, $FileList[$i])
Next
Case $mylist ;if select a item from list do stuff
$DataReadFromList = GUICtrlRead($mylist)
MsgBox(0,0,$DataReadFromList)
Case $GUI_EVENT_CLOSE
ExitLoop
EndSwitch
WEnd