So far, this is what I have:
$text_list = GUICtrlCreateListView("Available Text Files", 20, 50, 210, 150) $search = FileFindFirstFile("*.txt") local $file_name[500] = "" local $file_counter = 0 If $search = -1 Then GuiCtrlCreateLabel("No patterns found!", 80, 290) EndIf While 1 Local $file = FileFindNextFile($search) If @error Then ExitLoop $file_name[$file_counter] = GUICtrlCreateListViewItem($file, $text_list) $file_counter = $file_counter + 1 WEnd
This doesn't quite work though, I'm getting errors with the array.
If I were to do this:
$text_list = GUICtrlCreateListView("Available Text Files", 20, 50, 210, 150) $search = FileFindFirstFile("*.txt") If $search = -1 Then GuiCtrlCreateLabel("No patterns found!", 80, 290) EndIf While 1 Local $file = FileFindNextFile($search) If @error Then ExitLoop GUICtrlCreateListViewItem($file, $text_list) $file_counter = $file_counter + 1 WEnd
then it runs fine without error, and displays all the text files in the listview, which is what I want right? I thought I needed a controlID for each listviewitem though, or else how would I know what text file is selected, you know what I mean?
Any help appreciated.






