AlMax3000 Posted November 26, 2019 Posted November 26, 2019 (edited) I have 2 problems 1) i not read files in subfolders 2) i not choose which files to read ex: .exe and .cmd etc. in question: _GUICtrlComboBox_AddDir($idCombo, $sFileSelectFolder & "\*.exe") Edited November 26, 2019 by AlMax3000
SkysLastChance Posted November 26, 2019 Posted November 26, 2019 What is your question exactly? You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott
AlMax3000 Posted November 26, 2019 Author Posted November 26, 2019 (edited) 15 hours ago, SkysLastChance said: What is your question exactly? Local $sSelectFolder = FileSelectFolder("Select Folder", "") If @error Then continueloop GUICtrlSetData($Input, $sSelectFolder) ; Add files _GUICtrlComboBox_BeginUpdate($idCombo) _GUICtrlComboBox_AddDir($idCombo, $sSelectFolder & "\*.*") _GUICtrlComboBox_EndUpdate($idCombo) with this code I can only read all the files in a folder but I can't read the files contained in the subfolders and I can't choose which one to display the files I want _GUICtrlComboBox_AddDir($idCombo, $sSelectFolder & "\*.exe+*.cmd+*.bat") ecc.... in a nutshell I am trying to reconstruct my old program in VB NET, but I have only been using autoit for 11 days and I am in the grass Edited November 27, 2019 by AlMax3000
SkysLastChance Posted November 26, 2019 Posted November 26, 2019 _GUICtrlComboBox_AddDir($idCombo, $sSelectFolder & "\*") ? You may need to look into _FileListToArrayRec FrancescoDiMuro 1 You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott
FrancescoDiMuro Posted November 26, 2019 Posted November 26, 2019 @AlMax3000 Use _FileListToArrayRec() to read files/directories to an array, and then add the array elements in the ComboBox SkysLastChance and AlMax3000 1 1 Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Aelc Posted November 26, 2019 Posted November 26, 2019 (edited) 3 hours ago, AlMax3000 said: _GUICtrlComboBox_AddDir($idCombo, $sFileSelectFolder & "\*.exe") I guess your $sFileSelectFolder comes from an FileSelectFolder ("","") If so then delete the backslash _GUICtrlComboBox_AddDir($idCombo, $sFileSelectFolder & "*.exe") For subfolders you have to use _GUICtrlComboBoxEx_AddDir with $iAttribute = $DDL_Directory ( like helpfile says ) EDIT: I just tried the comboboxEx but it seems like it doesn't work for any reason, i couldn't localize. so you have to code around like @FrancescoDiMuro said Edited November 26, 2019 by Aelc why do i get garbage when i buy garbage bags?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now