yawoo Posted April 23, 2005 Share Posted April 23, 2005 I would like to write a GUI script such that I can add and remove file to a listbox. I have no concept to start with. Anyone got the simple sample code for me to reference with? Thx. Link to comment Share on other sites More sharing options...
quick_sliver007 Posted April 23, 2005 Share Posted April 23, 2005 I would like to write a GUI script such that I can add and remove file to a listbox. I have no concept to start with. Anyone got the simple sample code for me to reference with? Thx.<{POST_SNAPBACK}>Take a look at these UDF's ListBox UDFs I believe this will help you a lot. . Link to comment Share on other sites More sharing options...
yawoo Posted April 24, 2005 Author Share Posted April 24, 2005 Take a look at these UDF's ListBox UDFs I believe this will help you a lot.<{POST_SNAPBACK}>This script is too complex for you. Anyway, thanks for your reference. Link to comment Share on other sites More sharing options...
GaryFrost Posted April 24, 2005 Share Posted April 24, 2005 Look at the latest beta version has the listbox udfs. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
randallc Posted April 25, 2005 Share Posted April 25, 2005 Hi Garry, I agree, it would be useful to see this working and called in example macros for us beginners. - Nothing in Beta help yet? What do you think? Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
GaryFrost Posted April 25, 2005 Share Posted April 25, 2005 (edited) It is in the latest beta.http://www.autoitscript.com/forum/index.ph...opic=10256&st=0once you have the latest beta, go to the help and User Defined Functions you'll see GuiListBox ManagementIf you have any problems understanding the examples let me know, I tried to make them as simple as possible. Edited April 25, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
CyberSlug Posted April 25, 2005 Share Posted April 25, 2005 Great work, gafrost. I'll have some suggestions at some point. (For example, GetSelItems might actually work with single-selection list boxes). Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
GaryFrost Posted April 25, 2005 Share Posted April 25, 2005 (edited) Take what help I can get, If you look in the include you'll note I made sure you were included on some of the functions. Hoping to be able to impliment some more once and if ejoc gets the dll stuff into autoit. Also submitted, GuiComboBox, GuiListView, but might be a while for those to make it into the beta, noticed there's alot going on. Thanks for you help. Edit: checked that function, will only need to change documentation, it already works with single selection, still returns array at this point. Edit2: got _GUICtrlListBoxGetSelItemsText also will work with single sel listbox, but i'll need to submit the changes. Func _GUICtrlListBoxGetSelItemsText($h_listbox) Local $i, $s_list = "", $i_ret For $i = 0 To GuiCtrlSendMsg($h_listbox,$LB_GETCOUNT,0,0) - 1 $i_ret = GuiCtrlSendMsg($h_listbox,$LB_GETSEL,$i,0) If( $i_ret > 0 )Then If(StringLen($s_list) > 0) Then $s_list = $s_list & ',' & $i Else $s_list = $i EndIf ElseIf( $i_ret == $LB_ERR) Then Return $LB_ERR EndIf Next;$s_list should now equal the selected items If(StringLen($s_list) > 0) Then Local $a_text = StringSplit( $s_list, "," ) For $i = 1 to $a_text[0] $a_text[$i] = GuiCtrlRecvMsg($h_listbox,$LB_GETTEXT,$a_text[$i],1) Next Return $a_text Else Return $LB_ERR EndIf EndFunc Edited April 25, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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