Fractured Posted June 19, 2017 Share Posted June 19, 2017 Im back! Tinkering with my search gui and tried to add another folder to the search. I add some of the changes that I learned of here and thought I had everything going, but.... I keep getting the "File List To Array Error", "Invalid Include parameter" when it tried to do the second folder...if tried a few changes but nothing seems to get me past it...I can see data flow into the arrays but nothing...splat! expandcollapse popup;====================================================================================================================================== ; File Search Function ;====================================================================================================================================== Func _DWGS($sSearch = "DWG") Local $aFileList[0], $aFileLista, $aFileListc GUICtrlSetData($idFileList,"") Local $sdSearchSL = StringLeft($sSearch, 3) Local $sSourceFoldera = $g_sFilePatha & "\DWG" & $sdSearchSL Local $sSourceFolderc = $g_sFilePathc If FileExists($sSourceFoldera) = 0 Then MsgBox(4096, "File Path Error", "Folder : " & $sSourceFoldera & " does not exist.") Return "" EndIf If FileExists($sSourceFolderc) = 0 Then MsgBox(4096, "File Path Error", "Folder : " & $sSourceFolderc & " does not exist.") Return "" EndIf Local $sSearchMask = $sSearch & "?.*" Local $aFileLista = _FileListToArrayRec($sSourceFoldera, $sSearchMask & "*", 1, 1, 1, 2) _ArrayDisplay($aFileLista) ; Included to test if anyhting is going into $aFileListc Local $aFileListc = _FileListToArrayRec($sSourceFolderc, $sSearchMask & "*|*.cdr", 1, 1, 1, 2) _ArrayDisplay($aFileListc) ; Included to test if anyhting is going into $aFileListc _ArrayConcatenate($aFileList, $aFileLista, 1) _ArrayConcatenate($aFileList, $aFileListc, 1) Switch @error Case 1 MsgBox(4096, "File List To Array Error", "Path not found or invalid") Return "" Case 2 MsgBox(4096, "File List To Array Error", "Invalid Include parameter") Return "" Case 3 MsgBox(4096, "File List To Array Error", "Invalid Exclude parameter") Return "" Case 4 MsgBox(4096, "File List To Array Error", "Invalid Exclude_Folders parameter") Return "" Case 5 MsgBox(4096, "File List To Array Error", "Invalid $iReturn parameter") Return "" Case 6 MsgBox(4096, "File List To Array Error", "Invalid $iRecur parameter") Return "" Case 7 MsgBox(4096, "File List To Array Error", "Invalid $iSort parameter") Return "" Case 8 MsgBox(4096, "File List To Array Error", "Invalid $iReturnPath parameter") Return "" Case 9 MsgBox(4096, "File List To Array Error", "No files/folders found") Return "" EndSwitch Return _ArrayToString($aFileList, "|", 1) EndFunc Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 19, 2017 Moderators Share Posted June 19, 2017 Moved out of Examples forum and into General Help and Support. Please be aware of where you post in the future. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Fractured Posted June 19, 2017 Author Share Posted June 19, 2017 ahh sorry...thought I was in general help...miss clicked the mouse Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 19, 2017 Moderators Share Posted June 19, 2017 Fractured, How about you doing some errorchecking to try and help us help you. If you get an error telling you that there is an "Invalid Include parameter", why not add a ConsoleWrite or MsgBox command immediately before the _FileListToArrayRec call and see exactly what parameter you are passing to the function? Then you might see why you get this error. M23 Fr33b0w 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...
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