Moderators Melba23 Posted April 18, 2015 Author Moderators Share Posted April 18, 2015 c.haslam,Oops! Thanks for that, I will release a fix later today. 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...
Moderators Melba23 Posted April 18, 2015 Author Moderators Share Posted April 18, 2015 BUGFIX VERSION 18 Apr 15Fixed: A variable first declared inside an If statement - sorry about that. New zip in first post. 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...
c.haslam Posted April 18, 2015 Share Posted April 18, 2015 The error tells me that you are still human, like the rest of us! Thanks for fixing it. ...chris Spoiler CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard Link to comment Share on other sites More sharing options...
Deye Posted May 25, 2015 Share Posted May 25, 2015 Melba23+ 4 - Do not display Hidden files/folders + 8 - Do not display System files/folderscan we add a new switch - "+ protected" --> if file is both attributed +4 and +8 then don't show file..and change + 4 and + 8 switches to (if selected switch +4 or +8 and <> "protected" then don't show file..like this this we differentiate more needed types ThanksDeye Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 25, 2015 Author Moderators Share Posted May 25, 2015 Deye,Just to be clear, are you asking to hide files that are both hidden and system, but show files which are only one or the other? Obviously using +12 currently will hide files which have one or other of the attributes, so I just want to be sure I understand the request.If this is indeed the case, this would actually require a change to the standard _FileListToArrayRec function, as it is that which the UDF uses to get the file lists - so could I ask you to open a feature request in Trac.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...
Deye Posted May 25, 2015 Share Posted May 25, 2015 Melba,yes, that's the caseand ticket added : https://www.autoitscript.com/trac/autoit/ticket/3035thanks Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 11, 2015 Author Moderators Share Posted June 11, 2015 BUGFIX VERSION 11 Jun 15Fixed: A variable declared inside a first Case statement and not recognised in another. This is not picked up by Au3Check and only caused a problem under a specific parameter set. Sorry about that.New code in the first post.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...
232showtime Posted June 15, 2015 Share Posted June 15, 2015 this is awesome.... ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 15, 2015 Author Moderators Share Posted June 15, 2015 232showtime,Glad you like it.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...
Mbee Posted August 1, 2015 Share Posted August 1, 2015 Oh, great and wise Melba23, one of your tiny-brained worshipers beseeches you for guidance!First, I can't begin to thank you sufficiently for this amazing UDF! What I like most of all is that we can use it without a GUI.But my tiny brain must also be defective since I can't begin to fathom what the difference is between "0 + 16" and "16" Consider this code from some of your examples: "$sRet = _CFF_Choose("Ex 8 - Multiple checkboxes", 300, 500, -1, -1, "", Default, 0 + 16, -1)"How could that possibly be different than "$sRet = _CFF_Choose("Ex 8 - Multiple checkboxes", 300, 500, -1, -1, "", Default, 16, -1)" ??I mean, this kind of thing is simply setting bit flags, right? But 0 sets no bits at all, so what possible use is specifying it in the code?Well, that's not my main reason for posting this, which is to ask what I'm doing wrong with the following code:$L_Ret = _CFF_Choose($Cmy_Title, 300, 500, -1, -1, "", Default, 2 + 4 + 8 + 16 + 32, -1)What I'm trying to do is get a list of an arbitrary number of non-hidden folders ONLY from any volume on the system (files should not be seen or be selectable). That's why I must not specify 0 as one of the $iDisplay parameters (if it actually makes any difference?)But when I try that, all I get are the drive roots and nothing at all underneath them! No files and no folders whatsoever. What am I doing wrong?If it matters, unlike your example code, I do not call "_CFF_RegMsg()" since this is not a GUI script and thus I have no need of any handlers (unless I'm wrong about that...)Little help, please, Master? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 1, 2015 Author Moderators Share Posted August 1, 2015 Mbee,I seem to remember that I coded the flag as "0 + 16" in the examples just to make the point that using the "16" option will only work if you use the "0" option as the basic display. If you use one of the other basic options (1-3) then it has no effect - as described in the function header:; 0 - Entire folder tree and all matching files within folders - only files can be selected ; 1 - All matching files within the specified folder - subfolders are not displayed ; 2 - Entire folder tree only - no files. Doubleclicks will expand, not select, item ; 3 - As 2 but doubleclicks will select item if it has no children [...] ; + 16 - Both files and folders selectable if basic $iDisplay set to 0 - folders have trailing \If you set the basic display to 1 (files only) or 2/3 (folders only) then adding a flag which allows both files and folders to be selected when only one of them is displayed is of little use.As to the main question: you need to register at least the WM_NOTIFY handler as the UDF uses it to expand the tree when you click on a node. Once again, this is explained in the function header:Registers WM_NOTIFY for TreeView doubleclick and item expansion and WM_COMMAND for list focusSo you would need to use:_CFF_RegMsg(True, False) $L_Ret = _CFF_Choose($Cmy_Title, 300, 500, -1, -1, "", Default, 2 + 4 + 8 + 32, -1)Now you will be able to expand the tree - there is no need for the "16" because, as explained above, you are only displaying folders so it is ignored.All clear now?M23 Mbee 1 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...
Mbee Posted August 2, 2015 Share Posted August 2, 2015 Mbee,I seem to remember that I coded the flag as "0 + 16" in the examples just to make the point that using the "16" option will only work if you use the "0" option as the basic display. If you use one of the other basic options (1-3) then it has no effect - as described in the function header... Ah, I see. Thanks for explaining that!As to the main question: you need to register at least the WM_NOTIFY handler as the UDF uses it to expand the tree when you click on a node. Once again, this is explained in the function header:Registers WM_NOTIFY for TreeView doubleclick and item expansion and WM_COMMAND for list focusSo you would need to use:_CFF_RegMsg(True, False) $L_Ret = _CFF_Choose($Cmy_Title, 300, 500, -1, -1, "", Default, 2 + 4 + 8 + 32, -1)Now you will be able to expand the tree - there is no need for the "16" because, as explained above, you are only displaying folders so it is ignored.All clear now?Yes, thanks!By the way, after reading my post, I began to fear that the praise I heaped on you might have come across like assholish mockery or something. I assure you that is NOT what I intended! I've read a lot of your posts and have used several of your truly excellent UDFs and code snippets, and I meant to honor them -and- you. Please forgive me if I inadvertently offended... M23 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 2, 2015 Author Moderators Share Posted August 2, 2015 Mbee,might have come across like assholish mockery or somethingNo, I understood it was genuine - if a little OTT - but I will still respond even if you do not go to such lengths.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...
kcvinu Posted August 21, 2015 Share Posted August 21, 2015 (edited) @Melba23 Is it possible to display a specific file type in treeview ?. I have used your function for "*.exe" , but it displays some empty items in treeview with the exe files. Edited August 21, 2015 by kcvinu Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 21, 2015 Author Moderators Share Posted August 21, 2015 kcvinu,If you set the $sMask parameter to ""*.exe" you should only get only the exe files displayed - as long as you have the $iDisplay parameter set correctly. Please let me see the code you are using to call the UDF - and if possible a screenshot of what you get returned along with a list of what is actually in there. That way I can try and reproduce the problem (if indeed there is one).M23 kcvinu 1 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...
kcvinu Posted August 21, 2015 Share Posted August 21, 2015 (edited) Sure $sRet = _CFF_Choose("Experiment", 300, 500, -1, -1, "K:\", "*exe", 0,-1)And here is Screenshot of result. You see this, there is some blank entries with exe files. Those are not exe files. Edited August 21, 2015 by kcvinu Adding extra info Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 21, 2015 Author Moderators Share Posted August 21, 2015 kcvinu,This example script shows all the .exe files in the AutoIt installation - does it work for you?#include <MsgBoxConstants.au3> #include "ChooseFileFolder.au3" Global $sRootFolder = StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", Default, -1)) ConsoleWrite($sRootFolder & @CRLF) ; Register handlers Global $sRet = _CFF_RegMsg() If Not $sRet Then MsgBox(16, "Failure!", "Handler not registered") Exit EndIf $sRet = _CFF_Choose("Choose an .exe file", 300, 500, -1, -1, $sRootFolder, "*.exe", 0) If $sRet Then MsgBox($MB_SYSTEMMODAL + $MB_ICONINFORMATION, "Chosen", "Selected:" & @CRLF & @CRLF & $sRet) Else MsgBox($MB_SYSTEMMODAL + $MB_ICONINFORMATION, "Ooh Err", "No Selection") EndIfThere are some empty folders in the expanded tree - because there are no exe files within them. Is that what you meant by "empty items"? If so, then it is a not a bug but just the way that the UDF opens the tree - until a branch is expanded the UDF has no idea what is inside. Any subfolders are obviously shown as there might be other .exe files within them deeper n the tree.M23 kcvinu 1 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...
kcvinu Posted August 21, 2015 Share Posted August 21, 2015 (edited) So, how to avoid these empty folders from appearing in treeview ?. Edit: Got it. I need to play with this --- _GUICtrlTreeView_Delete() Edited August 21, 2015 by kcvinu Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 21, 2015 Author Moderators Share Posted August 21, 2015 kcvinu,Pretty obviously you cannot prevent it. if you want to expand a tree and only display a certain file type then you will always get "empty" places where none of the files are found. The only alternative would be to fully expand the tree, determine any completely empty branches, and then eliminate them before displaying the result. But as I found in the early versions of this UDF, expanding the whole tree before display was prohibitively slow - so I changed to the current method which only expands the tree branches when required. As a result you always get all the folders/subfolders within the tree, even when empty. But why do you see this as a problem?M23 kcvinu 1 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...
kcvinu Posted August 21, 2015 Share Posted August 21, 2015 Because, when i am going to select a file from the tree, it's a time wasting task to expand a child item and another item, then there is nothing and it's an empty folder. I only want to display the exe files only. Anyway, i think i can find a remedy for this. I think i can atleast disable the empty items. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) 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