NEW VERSION 03 Mar 20 --------------------- New: - UDF should now work correctly when #AutoIt3Wrapper_UseX64=Y directive is set. - Refreshing drive list possible when option selected in $iDisplay and no specific path has been set: CFF_Choose: Cancel button has dropdown style with "Refresh" selection. _CFF_Refresh function can also refresh drive list via HotKey CFF_Embed: Available via HotKey only - $iDisplay option 3 has been removed. The new display options work as follows: Option Display Selectable Action when folder double-clicked 0 Folders and files Files only Folder expands/contracts 1 Files only Files only N/A 2 Folders only Folders only Selects folder +16 Folders and files Folders and files Selects folder only when using option 0 There is also one small change for consistency: pressing the {ENTER} key when in single selection mode now selects the highlighted (highlit?) item in both _Choose and _Embed - it did not do so in _Choose before. Fixed: Bug in _Embed which could freeze UDF. NEW VERSION 16 Feb 17 --------------------- New: When using checkboxes and only files are to be returned, only files will display checkboxes. However, if any item is prechecked all items will display checkboxes to indicate the full path - but as before checked folders will only be returned if the UDF has been instructed to do so (+ 16 added to the $iDisplay parameter). BUGFIX VERSION 11 Jun 15 ------------------------ Fixed: A variable declared inside a first Case statement and not recognised in another BUGFIX VERSION 18 Apr 15 ------------------------ Fixed: A variable first declared inside an If statement. NEW VERSION 13 Mar 15 --------------------- Added: When checkboxes are used, selecting or clearing an item with the Alt key selected will check/clear all items on the path higher in the tree - as long as the +512 "only show deepest on path" option is selected and other items are not checked on the same path. If the Ctrl key is pressed, all items lower in the tree will be checked/cleared as long as they have actually been expanded at least once - unexpanded items are unaffected as they do not exist in the dialog tree until they have been expanded. Pressing both Ctrl & Alt keys will affect both higher and lower items. NEW VERSION 11 Feb 15 --------------------- Added: You can now select multiple items in the tree using checkboxes (just set the $iMultiple parameter to -1). Selecting or clearing an item with the Ctrl key pressed will check/clear all items lower in the tree as long as they have actually been expanded at least once - unexpanded items are unaffected as they do not exist in the dialog tree until they have been expanded. New: When using checkboxes items in the tree can be prechecked using the _CFF_SetPreCheck function. All items on the passed paths will be checked to give a visual indication that something is prechecked deeper within the tree. Prechecked items will always be returned unless the specific checkbox is expanded and cleared. There is an additional option for the $iDisplay parameter - adding 512 will only return the lowest item on any path so that checking higher level folders does not return them as well. It is not recommended to precheck significant numbers of items within the tree as checking newly expanded items against the large lists will increase the time taken for the tree to update. NEW VERSION 25 Aug 14 --------------------- Changed: When using _CFF_Choose with a default folder the dialog is hidden until the tree expansion is completed (or abandoned). This prevents flickering as the tree is opened to the correct level. Added: Again when using _CFF_Choose, adding 256 to the $iDisplay parameter shows small splash screens during any autoexpansion of the tree (see above) and when the UDF is searching if asked to show all available drives. NEW VERSION 11 Dec 13 --------------------- Changed - 1. If you want to choose between various drives, the UDF now adds them directly to the treeview. In _CFF_Choose having them appear in a separate combo is still an option. - 2. Following user feedback, the automatic scroll to the first file when selecting files from a tree is now an option in the $iDisplay parameter. Added: You can now not only define a default drive but also a default folder when choosing between various drives - adding a trailing "\" to the folder path will additionally open the folder. In my testing this sometimes fails for native TreeViews - I imagine because the internal processing that AutoIt needs to carry out delays the expansion process. If the tree has not correctly expanded the UDF automatically reruns the expansion up to 5 times with an increased delay between events until the desired endstate is reached - if there is still a problem then the TreeView is displayed unexpanded NEW VERSION 17 Oct 13 -------------------- Added: - 1. In the _CFF_Choose dialog you can now use the "Delete" button to delete an item in the selected list. To summarise for multiple selections: In _CFF_Choose To add an item either doubleclick the TreevView or select a TreeView item and press" Add". To delete a previously selected item, select it in either the TreeView or the list and press "Delete". To return the list press "Return". To abandon the selection process press "Escape" In _CFF_Embed you still add by doubleclicking and delete by doubleclicking with Ctrl pressed as before. Thanks to Tankbuster for prodding me to get it to work as he wanted. - 2. If displaying files and folders, but only files can be selected, opening a folder scrolls to display the beginning of the files within even if preceded by a long list of folders. This seemed more logical as it is the files that are of interest. Note: The UDF code uses the new Beta File.au3 include file - if you are still running 3.3.8.1 then look for the 3 lines highlighted by ~~~~~~~~~~~~~~~~~ and amend them as shown. You will also need my RecFileListToArray UDF which is in the zip - you do NOT need this file if you run the Beta. [NEW VERSION] 3 Aug 13 -------------------- Added: - 1. Passing a filename as the $sRoot parameter opens the tree in the folder containing the file with the file highlighted as the default selection. Thanks to jmon for the suggestion (even if he ignored the Beta I posted). -2. For multiple selections when using CFF_Choose there is now an "Add" and a "Delete" button which act on the selected item - double-clicking on a TreeView item will still add (or delete if Ctrl is pressed) the item. In CFF_EMBED double-clicking remains teh only way to add or delete items. Thanks again to Tankbuster for the suggestion - even if this change does not go quite as far as he originally requested. [NEW VERSION] 14 Jun 13 --------------------- Added: If you pass a list of drive letters in the $sRoot paramenter, _CFF_Choose will display only these drives in the drive combo at the top of the dialog - any invalid drive letters will be ignored. If you want one of these drives to be loaded automatically, then add "|drive_letter" after the list. Passing just "|drive_letter" in the parameter (with no drive list) automatically loads that drive and all ready drives will be displayed in the combo. See Example_3 script for more details. This is a non-scriptbreaking change. Thanks to Tankbuster for the request. [NEW VERSION] 28 May 13 --------------------- Added: Pressing the Ctrl key while selecting will remove the item (or its last instance - see below) from the return list. Changed: By default the same item cannot now be selected multiple times - but by adding + 32 to the $iDisplay parameter this becomes possible. Thanks to lhk69 for the requests. [NEW VERSION] 22 May 13 --------------------- Added: When both files and folders are displayed, the user can choose just files or both files AND folders. Just add +16 to the $iDisplay parameter. Thanks to lhk69 for the request. [NEW VERSION] 19 Dec 2012 ----------------------- Changed: The action taken when doubleclicking on a folder only tree when $iDisplay is set to 3 has changed slightly. Now the item is expanded/contracted if there are children, but selected if there are none. The previous version never selected items on doubleclick, only via the "Select" button - which of course will still select the item regardless of whether children exist. [NEW VERSION] 2 Dec 2012 ---------------------- Changed: Added the ability to both include and exclude files/folders from the tree. The $sMask parameter can now have 3 sections (separated by " | ") which define what to include, exclude and (if you are displaying both files and folders) which folders to exclude. See the [topic=126198]RecFileListToArray[/topic] thread (look in the first spoiler) for more details on exactly how these parameters affect the displayed tree. Note: You will need the [NEW VERSION] of my RecFileListToArray UDF. Look in that UDF thread for the new code. [NEW VERSION] 12 Oct 2012 ----------------------- Added: A new function _CFF_Embed which creates the folder tree in an existing treeview within your own GUI rather than having to use a UDF-created dialog. Thanks to Syed23 for the suggestion. Changed: Script breaking change to $iDisplay parameter syntax in _CFF_Choose - add 64 not 16 to hide file extensions. This was done as [NEW VERSION]s of _RecFileListToArray (which is needed to run the UDF) will have additional options which use the current value. Sorry about the change, but I am trying to future-proof as much as I can. [NEW VERSION] 4 Oct 2012 ---------------------- This is a completely rewritten version of the UDF with script-breaking syntax changes. It now develops the tree dynamically and is very much faster than previous versions. It also uses the [NEW VERSION] of my RecFileListToArray UDF to allow you to either show or hide hidden and system files/folders. Warning: There are script-breaking changes - read the _CFF_Choose function header to see how the $iDisplay parameter is now set - and you always need to register the WM_NOTIFY if you use the UDF. My thanks to caleb41610 for the thread which sparked the idea - and especially guinness for help with the #*@#*%# Struct !!!! [BUGFIX VERSION] - 16 Dec 11 -------------------------- - Fixed: Rapid clicking on the TreeView expand/contract icons could be treated as a double click and so trigger an inadvertant selection. Now double clicks are ignored for a short period after the TreeView is expanded/contracted. Thanks WPA-Fan for pointing it out. [NEW VERSION] - 23 May 11 - Warning: Script breaking syntax and function name changes ------------------------- Changes: - Added new option to display "files & only those folders containing files". - $iDisplay - 0 - Display full folder tree and matching files (default) 1 - Display all matching files within the specified folder - subfolders are not displayed 2 - Display folder tree only - no files NEW - 3 - Display only those folders containing matching files and the files within them + 4 - Do not display file extensions in tree (ignored if .* ext in $sFile_Mask) Option 0 will display all folders in the tree regardless of whether they hold matching files. Option 3 displays only those folders which contain files of the matching type - empty folders are not displayed unless they hold subfolders containing files. See Ex 1 and 2 in the example script. - Syntax change when using _CFF_IndexDefault to preload folders and/or files for speed. - Load separate "files" and "folders" defaults or a combined "files and folders" default. All 3 can be set independently. See Function header notes for details. - New functions to set existing arrays as defaults. _CFF_SetDefault replaced by: _CFF_SetDefault_Folder: Sets existing array as default folder index for speed _CFF_SetDefault_File: Sets existing array as default file index for speed _CFF_SetDefault_Combo: Sets existing array as default folder and file index for speed See Function header notes for details of how arrays must be created. This version requires the latest version of RecFileListToArray - see my sig below or in the zip. Sorry for the script breaking nature of this version - I hope anyone who uses it feels the changes were worth it. [BUGFIX VERSION] - 18 Feb 11 ---------------------------- Fixed: Bug which prevented selection of files when a drive had to be selected and multiple file extensions were possible but not displayed. No need to adjust existing scripts. [NEW VERSION] - 16 Feb 11 ------------------------- Changes: - Added option to display files without extensions - although the extensions are still in the returned file paths. - Just add 4 to the normal $iDisplay parameter. Note this option is not available if you use a .* wildcard in the $sFile_Mask parameter - if you do, how is the UDF supposed to know what extension to return? I did this so I could display a listing of .mp3 files in my music player without all of them showing the .mp3 extension - if I am choosing a track I know they are all .mp3 files! No need to adjust existing scripts - just use the option if you want to. [NEW VERSION] - 11 Feb 11 ------------------------- Changes: - Now x64 comaptible - thanks Ascend4nt and Yashied. - Now fully OnEvent mode compatible - I missed out a line last time. - Minor code changes - no need to adjust existing scripts.