luis713 Posted November 3, 2012 Share Posted November 3, 2012 (edited) Hi, i have the code below, i think it should work but it's not working, i need list all the files and folders in c:test, and if it is possible show its icon for each file, can you give me a clue? i think the array should not be working because i can't learnt how to use arraysexpandcollapse popup#include 'guiconstantsex.au3' #include 'guilistview.au3' #include 'guiimagelist.au3' #include 'array.au3' $Debug_LV = False ; Check ClassName being passed to ListView functions, set to True and use a handle to another control to see it work _Main() Func _Main() Local $hImage, $hListView GUICreate("ListView Set Image List", 400, 300) $hListView = GUICtrlCreateListView("", 2, 2, 394, 268) GUISetState() ; Load images $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0xFF0000, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x00FF00, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x0000FF, 16, 16)) Local $hPrevImageList = _GUICtrlListView_SetImageList($hListView, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($hListView, "Column 1", 100) Local $array[5] Local $i = 1 $File = FileFindFirstFile("F:*") _guictrllistview_additem($hListView, $file, $i) For $i = 1 To $array[0] $array = FileFindNextFile("F:*") $array = + 1 $i = + 1 _guictrllistview_additem($hListView, $array, $i) next ; Add items _GUICtrlListView_AddItem($hListView, "Item 1", 0) _GUICtrlListView_AddItem($hListView, "Item 2", 1) _GUICtrlListView_AddItem($hListView, "Item 3", 2) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main Edited November 3, 2012 by luis713 Link to comment Share on other sites More sharing options...
water Posted November 3, 2012 Share Posted November 3, 2012 I haven't used any of this but on the fourm you'll find a lot of functions to do what you need. is a thread which compares all/most of this functions.One of the best seems to be Melba's RecFileListToArray. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
luis713 Posted November 4, 2012 Author Share Posted November 4, 2012 thanks, i hope find the code needed Link to comment Share on other sites More sharing options...
AZJIO Posted November 4, 2012 Share Posted November 4, 2012 http://pastebin.com/s4LNfWVL - _FileDefaultIcon Original here - My other projects or all 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