byteme Posted July 11, 2005 Share Posted July 11, 2005 good morning everybody. is there a way to use the guictrlcreatecombo, then the next line would be GUICtrlSetData(-1, "whatever1|whatever2|....etc") but instead of setting the data within the script, put it in an ini file, and have the gui read that file to fill the list? i have a program that I put on many pc's and instead of updating the compiled script on each, i would rather edit the ini file whenever i need to, and all of the pc's will see the new info. is this possible to read all of the keys from a section of an ini file and put it as the set data? Thanks! byteme Link to comment Share on other sites More sharing options...
GaryFrost Posted July 11, 2005 Share Posted July 11, 2005 here's a piece from the CodeWizard might help to look at that. $T_STR = "" $ARRAY = IniReadSection(@ScriptDir & "\colors.ini", "SCHEMES") If @error Then MsgBox(4096, "Error occured", ", Error reading : " & @ScriptDir & "\colors.ini file.") Exit Else For $I = 1 To $ARRAY[0][0] If (StringLen($T_STR) == 0) Then $T_STR = $ARRAY[$I][1] Else $T_STR = $T_STR & "|" & $ARRAY[$I][1] EndIf Next EndIf $COLORSCHEME = GUICtrlCreateCombo("", 165, 60, 125, -1, $CBS_DROPDOWNLIST); create first item GUICtrlSetData($COLORSCHEME, $T_STR, $ARRAY[1][1]); add other items 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...
Danny35d Posted July 12, 2005 Share Posted July 12, 2005 (edited) you can use gafrost way or this way: $COLORSCHEME = GUICtrlCreateCombo("", 165, 60, 125, -1, $CBS_DROPDOWNLIST); create first item $ARRAY = IniReadSection(@ScriptDir & "\colors.ini", "SCHEMES") If @error Then MsgBox(4096, "Error occured", ", Error reading : " & @ScriptDir & "\colors.inifile.") Exit Else For $I = 1 To $ARRAY[0][0] _GUICtrlComboAddString($COLORSCHEME , $ARRAY[$x][0]) ;add other items Next EndIf EITHER WAY SHOULD WORK, GOOD LUCK!!! Edited July 12, 2005 by Danny35d AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
condoman Posted July 12, 2005 Share Posted July 12, 2005 This link is a program I wrote that uses a combo. The GUI allows you to add or delete from the combo. The resulting string is saved across sessions in an ini file. Source and exe included in zip file. Enjoy http://www.condoman.us/Thumbnail.zip Link to comment Share on other sites More sharing options...
byteme Posted July 12, 2005 Author Share Posted July 12, 2005 thank you all for your help. I was able to get my script to work. Thanks again! -condoman-- nice script! i have pics all over my pc, so I think I might borrow your program to help me look at them easier....Thanks! 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