Previously, I able to add files based on "FileSelectFolder" to the listbox.
Now, I want to do the same thing but using "FileOpenDialog".
Any clue to do it?
AutoIt
While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $btn_browsefiles $tmp = FileOpenDialog("Choose files", @WindowsDir & "", "Excel files (*.xls;*.xlsx)", 1 + 4) If Not @error Then _GUICtrlListBox_ResetContent($hListBox) $ordner = $tmp $dateien = _FileListToArray($ordner, "*.xls*", 1) _GUICtrlListBox_BeginUpdate($hListBox) For $i = 1 To UBound($dateien) - 1 ; Add file _GUICtrlListBox_AddString($hListBox, $dateien[$i]) Next _GUICtrlListBox_UpdateHScroll($hListBox) _GUICtrlListBox_EndUpdate($hListBox) EndIf Next Case $msg = $btn_browsefolder $tmp = FileSelectFolder("Choose folder", "") If Not @error Then _GUICtrlListBox_ResetContent($hListBox) $ordner = $tmp $dateien = _FileListToArray($ordner, "*.xls*", 1) _GUICtrlListBox_BeginUpdate($hListBox) For $i = 1 To UBound($dateien) - 1 ; Add file _GUICtrlListBox_AddString($hListBox, $dateien[$i]) Next _GUICtrlListBox_UpdateHScroll($hListBox) _GUICtrlListBox_EndUpdate($hListBox) EndIf Case $msg = $btn_clearlist $ordner=0 _GUICtrlListBox_ResetContent($hListBox) _GUICtrlListBox_UpdateHScroll($hListBox) Case $msg = $btn_transfer ScanFolder($ordner) EndSelect WEnd