elad1223 Posted February 19, 2013 Share Posted February 19, 2013 Hi all, I am really noobish in autoIT but i am a good programmer. the final product i want to do is a treeview of all the batches files and the folders in one folder (which content sub-folders with more batch) Like a dir command with checkboxes in the batch I started to do and array of the folders using _FileListToArray $hTreeView = GUICtrlCreateTreeView(2, 2, 396, 268) $FolderList=_FileListToArray(@ScriptDir,"*",2) $NumberOfFolders = $FolderList[0]-1 local $FileListFolder[$NumberOfFolders][10],$TreeView[$NumberOfFolders] For $x=1 To $NumberOfFolder MsgBox(0,"test",@ScriptDir & "\"& $FolderList[$x]) $FileListFolder[$x]=_FileListToArray(@ScriptDir & "\"& $FolderList[$x],"*",1) Next _GUICtrlTreeView_BeginUpdate($hTreeView) For $x = 0 To $NumberOfFolders $TreeView[$x]=GUICtrlCreateTreeViewItem($FolderList[$x], $hTreeView) For $y = 0 To GUICtrlCreateTreeViewItem($FileListFolder[$x][$y], $TreeView[$x]) Next Next _GUICtrlTreeView_Expand($hTreeView) _GUICtrlTreeView_EndUpdate($hTreeView) And I got error in this line: $FileListFolder[$x]=_FileListToArray(@ScriptDir & "\"& $FolderList[$x],"*",1) Array variable has incorrect number of subscripts or subscript dimension range exceeded. I dont know what i did wrong.. Could anyone help me? Thanks -elad Link to comment Share on other sites More sharing options...
johnmcloud Posted February 19, 2013 Share Posted February 19, 2013 (edited) Try to use instead of _FileListToArray, better managment for folder-file only, subfolder etc.If you need an helper for the syntax use page__st__180#entry1051894 Edited February 19, 2013 by johnmcloud Link to comment Share on other sites More sharing options...
AZJIO Posted February 19, 2013 Share Posted February 19, 2013 http://pastebin.com/s4LNfWVL My other projects or all Link to comment Share on other sites More sharing options...
elad1223 Posted February 19, 2013 Author Share Posted February 19, 2013 (edited) Try to use instead of _FileListToArray, better managment for folder-file only, subfolder etc.If you need an helper for the syntax use page__st__180#entry1051894You using a ready Function to browse. I don't need to browse my way, I just need to see what in my way.http://pastebin.com/s4LNfWVLI need to do sort of what you did there just instead of images check-boxes and instead of drives - @ScriptDir.I could not understand the code so well too many variables .Where do you put the files inside an Array and insert them to TreeView ?Thank you both for the quick reply.I should say that after the user check the check-boxes,he click a button and all the batches, that the checkbox is checked, will run one after the another.That the idea.Again Thank you for the quick reply Edited February 19, 2013 by elad1223 Link to comment Share on other sites More sharing options...
AZJIO Posted February 19, 2013 Share Posted February 19, 2013 - KaFu - Holger - Rasim My other projects or all Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 19, 2013 Moderators Share Posted February 19, 2013 elad1223,My ChooseFileFolder UDF (look in my sig for the link) offers you a treeview of a path with user-definable content and display options. It allows you to select items from the tree into an array which you can then loop through - sounds like it might be close to what you want. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
elad1223 Posted February 20, 2013 Author Share Posted February 20, 2013 (edited) - KaFu - Holger - RasimWow!That exactly what I wanted! Thank you very much ! elad1223,My ChooseFileFolder UDF (look in my sig for the link) offers you a treeview of a path with user-definable content and display options. It allows you to select items from the tree into an array which you can then loop through - sounds like it might be close to what you want. M23You are stunning!you made my world so much easier! In the end I combined both of the examples to one that I wanted.I admire your forum, you are amazing people ! Thank you very much Edited February 20, 2013 by elad1223 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 20, 2013 Moderators Share Posted February 20, 2013 elad1223, Glad we could help. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
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