Your main problem is your mistaking a ListView with a ListBox, they are not the same thing. If you want to do it with a ListView, use this script with changes to your script.
#include <GUIConstantsEx.au3>
#include <StructureConstants.au3>
#include <WindowsConstants.au3>
$modeli = IniReadSectionNames(@ScriptDir & "test.ini")
Global $hListView
main()
Func main()
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$hListView = GUICtrlCreateListview("1", 8, 16, 377, 409)
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
$Lista = ""
For $i = 1 To $modeli[0]
$Lista &= "|" & $modeli[$i]
GUICtrlCreateListViewItem($modeli[$i], $hListView)
Next
;~ GUICtrlSetData($hListView, $Lista)
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>main
Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
#forceref $hWnd, $iMsg, $iwParam
Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo
$hWndListView = $hListView
If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView)
$tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
$hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
$iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
$iCode = DllStructGetData($tNMHDR, "Code")
Switch $hWndFrom
Case $hWndListView
Switch $iCode
Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button
$tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
;~ do something, for testing i use message box.
MsgBox(4160, "TEST", "Selected Item: " & GUICtrlRead($hListView))
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY