enigmaforceiv Posted August 30, 2012 Share Posted August 30, 2012 Hello, I'm trying to get the script to display a list of files in a subdirectory. I've tried using a variable, and recalling the variable - but the thing is, it only returns a "0". How can I list the files? Thanks! Global $Buyers $Buyers = FileRead("C:\D\C21\Database\Buyers") GUICtrlCreateTab(50, 50, 700, 300) GUICtrlCreateTabItem("Buyers") GUICtrlCreateLabel(call($Buyers), 60, 80, 700, 300) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 30, 2012 Moderators Share Posted August 30, 2012 enigmaforceiv,Welcome to the AutoIt forum. Might I suggest looking at the Help file? You will see that FileRead is defined as:"Read in a number of characters from a previously opened text file"and so is unlikely to do what you want. The function you do need is FileListToArray:"Lists files andor folders in a specified path"If you need to list the content deeper in the tree you might like to take a look at my RecFileListToArray UDF (link is in my sig). 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...
enigmaforceiv Posted August 30, 2012 Author Share Posted August 30, 2012 Thank you very much! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 30, 2012 Moderators Share Posted August 30, 2012 enigmaforceiv, My pleasure. We are very proud of our Help file - always worth a look in there when you are looking for a solution. M23 Attckdog 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...
enigmaforceiv Posted August 30, 2012 Author Share Posted August 30, 2012 I've looked in the help file and failed to find the "Array.au3", do you know where else I might get it? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 31, 2012 Moderators Share Posted August 31, 2012 enigmaforceiv,Array.au3 is an include file - a library of functions that you can use in your scripts. You can find these functions under the <User Defined Function Reference> section of the Help file. You need to open the "AutoIt3Help.exe" file to get the full Help file - it links the native and UDF Help files into one package. 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...
Attckdog Posted August 31, 2012 Share Posted August 31, 2012 You need to open the "AutoIt3Help.exe" file to get the full Help file - it links the native and UDF Help files into one package. Does SciTE open the full help file by default ? A true renaissance man Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 31, 2012 Moderators Share Posted August 31, 2012 Attckdog,If you can see the <User Defined Function Reference> section when you press F1 then I suppose it does. Have you tried it to see? I have. 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...
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