Jump to content

ChooseFileFolder - Interim Version 11 Mar 21


Melba23
 Share

Recommended Posts

  • Moderators

Deye,

This should fix the problem: :)

<snip>

M23

Edit: Posted new version with better solution. :)

Edited by Melba23
Removed Beta code

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 by Deye
Link to comment
Share on other sites

  • Moderators

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. :wacko:

- 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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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. :wacko:

yes, I'm not sure if you will be able to reproduce this. over all I've tested with 4 drives connected

this happens only with one of them

I 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 by Deye
Link to comment
Share on other sites

  • Moderators

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 by Melba23
Removed Beta code

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 by Deye
Link to comment
Share on other sites

  • Moderators

Deye,

I had already noticed that and I believe I have a fix: ;)

<snip>

Over to you. :)

M23

Edited by Melba23
Beta code deleted

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 by Deye
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

#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

  • Moderators

Deye,

 

was looking for a way to build arrays upon a DriveGetDrive("Fixed") array

This is how you can do that: ;)

#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   ;==>SHGetSpecialFolderPath
All 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? :huh:

M23

Edited by Melba23
Typo

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 by Deye
Link to comment
Share on other sites

  • Moderators

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. :mad:

So back the the regex drawing board - but not tonight.... ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

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? :huh:

M23

Edited by Melba23
Beta code removed

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

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 zip in the first post. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

M23,
 
  thanks for the new release
  its looking good :thumbsup:
  
  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 by Deye
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

  • Moderators

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 by Melba23
Beta code removed

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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..
 

#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 by Deye
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...