Moderators Melba23 Posted January 31, 2015 Author Moderators Share Posted January 31, 2015 (edited) Deye,This should fix the problem: <snip>M23Edit: Posted new version with better solution. Edited February 1, 2015 by Melba23 Removed Beta code 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 January 31, 2015 Share Posted January 31, 2015 (edited) M23, two more: 1. further to my testing, on 1 other drive if I don't expand it, hitting just return used with $aPreCheck_List I get double items in the return list for that drive 2. this one is not so much of a bug but probably for best practice, a routine that should be included, more like a something to help users using this UDF avoid a confusion later on I loaded a Concatenated array where I used _FileListToArrayRec in one. where it includes for instance "C:UsersuserDesktop" in another array I have included for instance "C:UsersuserDesktopautoit" The return will include both paths when used with "+ 512" Deye Edited January 31, 2015 by Deye Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 31, 2015 Author Moderators Share Posted January 31, 2015 Deye,- 1. I am not sure I fully understand what you are telling me. You say that you pass an array of paths for prechecking and then if you hit "Return" without any expansion of the tree the UDF returns those paths twice? Can you let me see the array you pass and the parameters you use for the _CFF_Choose call so I can test. - 2. The UDF does no internal checking of the prechecking array to prevent the user from passing partial paths. I will look to see how I might introduce such a thing. 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 January 31, 2015 Share Posted January 31, 2015 (edited) You say that you pass an array of paths for prechecking and then if you hit "Return" without any expansion of the tree the UDF returns those paths twice? Can you let me see the array you pass and the parameters you use for the _CFF_Choose call so I can test. yes, I'm not sure if you will be able to reproduce this. over all I've tested with 4 drives connectedthis happens only with one of themI used: Local $sRet = _CFF_Choose("Checkboxes", 300, 500, -1, -1, "", Default, 0 + 8 + 16 + 512, -1)Local $aArray2 = _FileListToArrayRec("D:", "*|Documents?and?Settings;program?Files;program?Files?(x86);ProgramData;windows;users;", 0 + 8) For $i = 1 To $aArray2[0] $aArray2[$i] = ("D:" & "\" & $aArray2[$i]) Next Edited January 31, 2015 by Deye Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 31, 2015 Author Moderators Share Posted January 31, 2015 (edited) Deye,Thanks, I will look into it tomorrow. Here is a modified _CFF_SetPreCheck function which checks for partial paths:<snip>My testing was satisfactory, but please let me know if it works for you too. M23 Edited February 1, 2015 by Melba23 Removed Beta code 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 February 1, 2015 Share Posted February 1, 2015 (edited) My testing was satisfactory, but please let me know if it works for you too. M23 no more double Items in the return new problem found: New folder (2) New folder prechecking "New folder (2)" but not "New folder" Edited February 1, 2015 by Deye Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 1, 2015 Author Moderators Share Posted February 1, 2015 (edited) Deye,I had already noticed that and I believe I have a fix: <snip>Over to you. M23 Edited February 3, 2015 by Melba23 Beta code deleted 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 February 1, 2015 Share Posted February 1, 2015 (edited) M23, this one took care of getting deepest paths in the return with the latest one, it missed some file's prechecking "x.reg". tried copying this file to another drive, and in the test it gets picked, only not in the drive where its originally laid at. I went back to using the one you snipped a while ago to test and some how I don't see the problem as before (getting double items) and it gets that file prechecked as not with the latest one you posted. Deye Edited February 1, 2015 by Deye Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 1, 2015 Author Moderators Share Posted February 1, 2015 Deye,it missed some file's prechecking "x.reg".As I have mentioned before, merely saying that the UDF does not work on a random filename is useless. I need to see the array you use to pass the pre-checked items and the syntax of the _Choose call. Only then can I test and see if I can reproduce the problem. 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 February 1, 2015 Share Posted February 1, 2015 was looking for a way to build arrays upon a DriveGetDrive("Fixed") array but found it impossible so far anyway this is what I'm passing in expandcollapse popup#include "ChooseFileFolder_Mod_PreCheck.au3" Const $CSIDL_LOCAL_APPDATA = 28 Func LOCAL_APPDATA() Return SHGetSpecialFolderPath($CSIDL_LOCAL_APPDATA) EndFunc ;==>LOCAL_APPDATA Func SHGetSpecialFolderPath($csidl) Local $hwndOwner = 0, $lpszPath = "", $fCreate = False, $MAX_PATH = 260 $lpszPath = DllStructCreate("char[" & $MAX_PATH & "]") $BOOL = DllCall("shell32.dll", "int", "SHGetSpecialFolderPath", "int", $hwndOwner, "ptr", _ DllStructGetPtr($lpszPath), "int", $csidl, "int", $fCreate) If Not @error Then Return SetError($BOOL[0], 0, DllStructGetData($lpszPath, 1)) Else Return SetError(@error, 0, 0) EndIf EndFunc ;==>SHGetSpecialFolderPath If FileExists("C:") Then Local $aArray1 = _FileListToArrayRec("C:", "*|MSOCache;intel;MSOCache;Documents?and?Settings;IDE;program?Files;program?Files?(x86);ProgramData;PerfLogs;windows;users;Config.Msi;", 0 + 8) For $i = 1 To $aArray1[0] $aArray1[$i] = ("C:" & "\" & $aArray1[$i]) Next If FileExists("D:") Then Local $aArray2 = _FileListToArrayRec("D:", "*|MSOCache;intel;MSOCache;Documents?and?Settings;IDE;program?Files;program?Files?(x86);ProgramData;PerfLogs;windows;users;Config.Msi;", 0 + 8) For $i = 1 To $aArray2[0] $aArray2[$i] = ("D:" & "\" & $aArray2[$i]) Next If FileExists("E:") Then Local $aArray3 = _FileListToArrayRec("E:", "*|MSOCache;intel;MSOCache;Documents?and?Settings;IDE;program?Files;program?Files?(x86);ProgramData;PerfLogs;windows;users;Config.Msi;", 0 + 8) For $i = 1 To $aArray3[0] $aArray3[$i] = ("E:" & "\" & $aArray3[$i]) Next If FileExists("F:") Then Local $aArray4 = _FileListToArrayRec("F:", "*|MSOCache;intel;MSOCache;Documents?and?Settings;IDE;program?Files;program?Files?(x86);ProgramData;PerfLogs;windows;users;Config.Msi;", 0 + 8) For $i = 1 To $aArray4[0] $aArray4[$i] = ("F:" & "\" & $aArray4[$i]) Next If FileExists("G:") Then Local $aArray5 = _FileListToArrayRec("G:", "*|MSOCache;intel;MSOCache;Documents?and?Settings;IDE;program?Files;program?Files?(x86);ProgramData;PerfLogs;windows;users;Config.Msi;", 0 + 8) For $i = 1 To $aArray5[0] $aArray5[$i] = ("G:" & "\" & $aArray5[$i]) Next If FileExists("H:") Then Local $aArray6 = _FileListToArrayRec("H:", "*|MSOCache;intel;MSOCache;Documents?and?Settings;IDE;program?Files;program?Files?(x86);ProgramData;PerfLogs;windows;users;Config.Msi;", 0 + 8) For $i = 1 To $aArray6[0] $aArray6[$i] = ("H:" & "\" & $aArray6[$i]) Next _ArrayDelete($aArray2,0) _ArrayDelete($aArray3,0) _ArrayDelete($aArray4,0) _ArrayDelete($aArray5,0) _ArrayDelete($aArray6,0) ;~ _ArrayDisplay($aArray3) _ArrayConcatenate($aArray1, $aArray2) _ArrayConcatenate($aArray1, $aArray3) _ArrayConcatenate($aArray1, $aArray4) _ArrayConcatenate($aArray1, $aArray5) _ArrayConcatenate($aArray1, $aArray6) $Roam = @AppDataDir $DataLocal = LOCAL_APPDATA() $Pst = _FileListToArrayRec($DataLocal & "\" & "Microsoft\Outlook", "*|extend.dat", 0 + 4 + 8) For $i = 1 To $Pst[0] $Pst[$i] = ($DataLocal & "\" & "Microsoft\Outlook\" & $Pst[$i]) Next $aArrayUser = _FileListToArrayRec(@UserProfileDir, "*|ntuser.*;PUTTY.RND*;.thumbnails;appdata", 0 + 4 + 8) For $i = 1 To $aArrayUser[0] $aArrayUser[$i] = (@UserProfileDir & "\" & $aArrayUser[$i]) Next ;custom add test Local $aArrayadd[] = ["C:\Program Files (x86)\7-Zip\Lang1\af.txt", "C:\Program Files (x86)\7-Zip", "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"] _ArrayDelete($aArrayUser,0) _ArrayDelete($Pst,0) _ArrayDelete($aArrayadd,0) _ArrayConcatenate($aArray1, $aArrayUser) _ArrayConcatenate($aArray1, $Pst) _ArrayConcatenate($aArray1, $aArrayadd) $aPreCheck_List = $aArray1 _CFF_RegMsg() _CFF_SetPreCheck($aPreCheck_List) Local $sRet = _CFF_Choose("Checkboxes", 300, 500, -1, -1, "", Default, 0 + 8 + 16 + 512, -1) If $sRet Then $aRet = StringSplit($sRet, "|") $sRet = "" For $i = 1 To $aRet[0] $sRet &= $aRet[$i] & @CRLF Next EndIf _ArraySort($aRet, 0, 0, 0, 1) _ArrayDisplay($aRet) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 1, 2015 Author Moderators Share Posted February 1, 2015 (edited) Deye, was looking for a way to build arrays upon a DriveGetDrive("Fixed") arrayThis is how you can do that: expandcollapse popup#include "ChooseFileFolder_Mod_PreCheck.au3" Const $CSIDL_LOCAL_APPDATA = 28 Local $aMainArray[1] = [0], $aTempArray $aDrives = DriveGetDrive("FIXED") If IsArray($aDrives) Then For $i = 1 To $aDrives[0] ; Use the UDF to return full paths - no need to add the drive yourself <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $aTempArray = _FileListToArrayRec($aDrives[$i] & "\", "*|MSOCache;intel;MSOCache;Documents?and?Settings;IDE;program?Files;program?Files?(x86);ProgramData;PerfLogs;windows;users;Config.Msi;", 0 + 8, 0, 0, 2) If IsArray($aTempArray) Then ; Again, use the UDF to prevent the first element from being added <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< _ArrayConcatenate($aMainArray, $aTempArray, 1) EndIf Next EndIf $Roam = @AppDataDir $DataLocal = LOCAL_APPDATA() $Pst = _FileListToArrayRec($DataLocal & "\" & "Microsoft\Outlook", "*|extend.dat", 0 + 4 + 8) If Not @error Then For $i = 1 To $Pst[0] $Pst[$i] = ($DataLocal & "\" & "Microsoft\Outlook\" & $Pst[$i]) Next EndIf $aArrayUser = _FileListToArrayRec(@UserProfileDir, "*|ntuser.*;PUTTY.RND*;.thumbnails;appdata", 0 + 4 + 8) If Not @error Then For $i = 1 To $aArrayUser[0] $aArrayUser[$i] = (@UserProfileDir & "\" & $aArrayUser[$i]) Next EndIf ;custom add test Local $aArrayadd[] = ["?", "E:\Digital Music\Bruce, Jack\Willpower\12-Without A Word.mp3", "M:\CFF_Test (x86)\Adobe\Reader 11.0\x.reg", "C:\ProgramData\Acronis\TrueImage\Logs\29_August_2014_11_14_33.log"] If IsArray($aArrayUser) Then _ArrayConcatenate($aMainArray, $aArrayUser, 1) If IsArray($Pst) Then _ArrayConcatenate($aMainArray, $Pst, 1) _ArrayConcatenate($aMainArray, $aArrayadd, 1) $aPreCheck_List = $aMainArray _CFF_RegMsg() _CFF_SetPreCheck($aPreCheck_List) Local $aRet Local $sRet = _CFF_Choose("Checkboxes", 300, 500, -1, -1, "", Default, 0 + 8 + 16 + 512, -1) If $sRet Then $aRet = StringSplit($sRet, "|") $sRet = StringReplace($sRet, "|", @CRLF) ConsoleWrite($sRet & @CRLF) EndIf If IsArray($aRet) Then _ArraySort($aRet, 0, 0, 0, 1) _ArrayDisplay($aRet) EndIf Func LOCAL_APPDATA() Return SHGetSpecialFolderPath($CSIDL_LOCAL_APPDATA) EndFunc ;==>LOCAL_APPDATA Func SHGetSpecialFolderPath($csidl) Local $hwndOwner = 0, $lpszPath = "", $fCreate = False, $MAX_PATH = 260 $lpszPath = DllStructCreate("char[" & $MAX_PATH & "]") $BOOL = DllCall("shell32.dll", "int", "SHGetSpecialFolderPath", "int", $hwndOwner, "ptr", _ DllStructGetPtr($lpszPath), "int", $csidl, "int", $fCreate) If Not @error Then Return SetError($BOOL[0], 0, DllStructGetData($lpszPath, 1)) Else Return SetError(@error, 0, 0) EndIf EndFunc ;==>SHGetSpecialFolderPathAll the files I added to the list were prechecked and returned, as were all the non-excluded folders. What exactly goes wrong when you run it? M23 Edited February 2, 2015 by Melba23 Typo 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 February 2, 2015 Share Posted February 2, 2015 (edited) M23, Thanks for the corrections just got back - and out again soon .. lets see if this can be reproducible for the test try placing these 2 files and 1 folder on the same drive (at root) with the same naming to see if they get prechecked (for me just X.txt.cmd is checked) "X.txt.cmd" "x.txt" "Edit" Deye Edited February 2, 2015 by Deye Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 2, 2015 Author Moderators Share Posted February 2, 2015 Deye,Simple fix for the files - limit the "partial path" check to folders only. The reason that the folder does not get checked is that it contains the literal string "E". This shortcircuits the Regex I use to check for pre-checked items - I always said that Regexes made my brain bleed and this seems to be another case in point. >To explain in more detail - certain characters have a special meaning inside regex patterns and need to be escaped to be read as literals. You can also enclose the string inside "Q...E" - but obviously the string must not contain a "E", which that folder name certainly does. So back the the regex drawing board - but not tonight.... 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 February 3, 2015 Author Moderators Share Posted February 3, 2015 (edited) Deye,After one round of golf (pretty cold!) and one brainhurting regex session (pretty warm!), I have a new Beta for you: <snip>How is this one looking? M23 Edited February 11, 2015 by Melba23 Beta code removed 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 February 11, 2015 Author Moderators Share Posted February 11, 2015 NEW VERSION 11 Feb 15Added: 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 zip in the first post. M23 Deye 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...
Deye Posted February 12, 2015 Share Posted February 12, 2015 (edited) M23, thanks for the new release its looking good I have found one more thing just yesterday with prechecks on root drives, when I uncheck those and hit return they will still stay resident in the return ( even with applying new checks deeper on each of these prechecked drive's) #include "ChooseFileFolder.au3" Local $aArrayadd[] = ["?", "E:\", "D:\", "F:\"] _CFF_RegMsg() If IsArray($aArrayadd) Then $aPreCheck_List = $aArrayadd _CFF_SetPreCheck($aPreCheck_List) EndIf $sRet = _CFF_Choose("choose files\folders" & " (" & @UserName & ")", -300, -500, -1, -1, "", Default, 0 + 8 + 16 + 512, -1) If $sRet Then $aRet = StringSplit($sRet, "|") $sRet = "" For $i = 1 To $aRet[0] $sRet &= $aRet[$i] & @CRLF Next EndIf If IsArray($aRet) Then _ArrayDisplay($aRet) Deye Edited February 12, 2015 by Deye Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 12, 2015 Author Moderators Share Posted February 12, 2015 Deye,Easy to fix - but I will wait a while and see if you come up with any other edge cases before releasing a new version. 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 February 12, 2015 Share Posted February 12, 2015 M23, for the extra tests i tried running without "+ 512" the prechecking wont get folders checked... if you ask me ,I don't think anyone should look for any other returns other then with + 512 maybe an idea for extra spring cleaning the code other then what I've found and tested so far its all looking very good. Deye Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 13, 2015 Author Moderators Share Posted February 13, 2015 (edited) Deye,I see no reason why prechecking should only work with "+ 512" - but you will only get the full path prechecked with that option as only with it will the incremental items not be returned. If you precheck without "+ 512" then only the actual item should be prechecked. Try this Beta and see if I have fixed the problems you have encountered so far:<snip>M23 Edited February 17, 2015 by Melba23 Beta code removed 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 February 16, 2015 Share Posted February 16, 2015 (edited) M23, I have come across one more thing and I'm not yet sure if its a general limitation or the UDF's how can the precheck list be reset to = 0 when clicking cancel.. expandcollapse popup#include "ChooseFileFolder.au3" Global $aArrayadd[4] = ["C:\", "D:\", "E:\"], $aRet, $aPreCheck_List example() Func example() _CFF_RegMsg() If IsArray($aArrayadd) Then $aPreCheck_List = $aArrayadd _CFF_SetPreCheck($aPreCheck_List) EndIf $sRet = _CFF_Choose("choose files\folders", -300, -500, -1, -1, "", Default, 0 + 8 + 16 + 512, -1) If $sRet Then $aRet = StringSplit($sRet, "|") $sRet = "" For $i = 1 To $aRet[0] $sRet &= $aRet[$i] & @CRLF Next EndIf If Not IsArray($aRet) Then Local $confirm = MsgBox(36, "try", "set PreCheck_List to = 0") If $confirm = 6 Then $aArrayadd = 0 $aPreCheck_List = 0 try() EndIf If $confirm = 7 Then Exit 0 EndIf EndFunc ;==>example Func try() example() EndFunc ;==>try thanks Deye Edited February 16, 2015 by Deye 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