zabimaru27 Posted June 8, 2009 Share Posted June 8, 2009 Hi everybody My problem is i generated the following empty template #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=\\dmhd003\463036$\workarea\autoit\koda_2008-10-03\forms\test.kxf $Form1_1 = GUICreate("Form1", 633, 569, 191, 123) $List1 = GUICtrlCreateList("", 8, 40, 249, 513) $Label1 = GUICtrlCreateLabel("Liste des Serveurs", 8, 8, 91, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd that just display an empty listbox. I would like to know how to fill it with data contained in a file, line by line. Does it's complicated, cause , i know a little autoIt language but i'm a big noob with graphical function. Thanks in advance Link to comment Share on other sites More sharing options...
water Posted June 8, 2009 Share Posted June 8, 2009 I would like to know how to fill it with data contained in a file, line by line.Something like that? 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...
zabimaru27 Posted June 8, 2009 Author Share Posted June 8, 2009 Hummm thanks, but in fact i don't really understand what does this code. And it seem to be for a list view, and not for a listbox ??? no ? If someone nice could write me this code and explain me this strange process thanks Link to comment Share on other sites More sharing options...
water Posted June 8, 2009 Share Posted June 8, 2009 (edited) You're right. So this posting might help.Replace GuiCtrlCreateCombo with GUICtrlCreateList.To see how it works - and to improve your autoit knowledge - please have a look in the help file for the functions in question. Edited June 8, 2009 by water 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...
zabimaru27 Posted June 8, 2009 Author Share Posted June 8, 2009 Thanks , it's working very well. Just one question. It seems than the "GUICtrlSetData" function is working for the last item created. How can i use it for a specific box created earlier in the program ?? thanks Link to comment Share on other sites More sharing options...
water Posted June 9, 2009 Share Posted June 9, 2009 Instead of -1 as the controlID for the GUICtrlSetData use the handle returned by GUICtrlCreateList ($List1 in your first example). 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...
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