This what you want?
#include-once
; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ;
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>
#include <GUIListview.au3>
#include <GUIListBox.au3>
HotKeySet("{ESC}", "_Exit")
;Will need to create to read it from external file
$TVID = GUICreate("TVID",331,374,-1,-1,-1,-1)
$nameinput = GUICtrlCreateInput("Search By Name",20,20,185,30,-1,512)
GUICtrlSetFont(-1,12,400,0,"MS Sans Serif")
$bsearch = GUICtrlCreateButton("Search",210,20,100,30,-1,-1)
GUICtrlSetFont(-1,12,400,0,"MS Sans Serif")
$namelist = GUICtrlCreateCombo("",20,60,290,149,-1,512)
$bconnect = GUICtrlCreateButton("Connect To PC",20,255,290,30,-1,-1)
GUICtrlSetFont(-1,12,400,0,"MS Sans Serif")
$pwdinput = GUICtrlCreateInput("Input Password if different from default",20,220,290,28,-1,512)
GUICtrlSetFont(-1,12,400,0,"MS Sans Serif")
$bexit = GUICtrlCreateButton("E X I T",110,301,100,57,-1,-1)
GUISetState(@SW_SHOW)
;Get Items from files
$file = @ScriptDir & "\IDs\TVid.ini"
Dim $newvalue, $userlist, $IDs, $userlist[10], $IDs[10]
$sections = IniReadSectionNames($file)
If @error Then
MsgBox(4096, "", "Error occured, probably no INI file.")
Else
For $i = 1 To $sections[0]
$newvalue = $newvalue & $sections[$i] & "|"
Next
GUICtrlSetData($namelist, StringTrimRight($newvalue, 1))
EndIf
while 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_Exit()
Case $bexit
_Exit()
case $bconnect
Connection()
case $bsearch
Case $namelist
ConsoleWrite("Selected: " & GUICtrlRead($namelist) & @CRLF)
EndSwitch
WEnd
Func Searcher()
;This is where I need it to find rather which item in the list is selected and then display its user name.
Exit ;Erase or comment upon finished code
EndFunc
Func Connection()
Exit ;Erase or comment upon finished code
EndFunc
Func _Exit()
Exit
EndFunc