tobi2006 Posted April 8, 2008 Share Posted April 8, 2008 $loadname2 = FileOpenDialog("Load Ini-File...", @ScriptDir & "\", "Ini (*.ini)", 1 + 4 ) $line1= IniReadSection($loadname2,"Color") $line2= IniReadSection($loadname2,"Size") $line3= IniReadSection($loadname2,"Bg-Color") _GUICtrlComboBox_SetEditText($Combo1, $line1) _GUICtrlComboBox_SetEditText($Combo2, $line2) _GUICtrlComboBox_SetEditText($Combo3, $line3) Why is there "0" in the ComboBox? Link to comment Share on other sites More sharing options...
martin Posted April 8, 2008 Share Posted April 8, 2008 $loadname2 = FileOpenDialog("Load Ini-File...", @ScriptDir & "\", "Ini (*.ini)", 1 + 4 ) $line1= IniReadSection($loadname2,"Color") $line2= IniReadSection($loadname2,"Size") $line3= IniReadSection($loadname2,"Bg-Color") _GUICtrlComboBox_SetEditText($Combo1, $line1) _GUICtrlComboBox_SetEditText($Combo2, $line2) _GUICtrlComboBox_SetEditText($Combo3, $line3) Why is there "0" in the ComboBox?You need to give the elements of the arrays you want in the comboboxes, or maybe you didn't want IniReadSection. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
DarkMatter Posted April 8, 2008 Share Posted April 8, 2008 $loadname2 = FileOpenDialog("Load Ini-File...", @ScriptDir & "\", "Ini (*.ini)", 1 + 4 ) $line1= IniReadSection($loadname2,"Color") $line2= IniReadSection($loadname2,"Size") $line3= IniReadSection($loadname2,"Bg-Color") _GUICtrlComboBox_SetEditText($Combo1, $line1) _GUICtrlComboBox_SetEditText($Combo2, $line2) _GUICtrlComboBox_SetEditText($Combo3, $line3) Why is there "0" in the ComboBox? iniReadSection Success: Returns a 2 dimensional array where element[n][0] is the key and element[n][1] is the value It's because $line1 & $line2 & $line3 are arrays. [sub]Quantum mechanics: The dreams stuff is made of[/sub] Link to comment Share on other sites More sharing options...
tobi2006 Posted April 8, 2008 Author Share Posted April 8, 2008 (edited) CODE Orange 18 [bg-Color] Green That's my ini-file. No values. Edited April 8, 2008 by tobi2006 Link to comment Share on other sites More sharing options...
DarkMatter Posted April 8, 2008 Share Posted April 8, 2008 (edited) That is not a properly formated INI. Try something like this: [Settings] Color=Orange Size=18 BgColor=Green $INIData = IniReadSection($loadname2,"Settings") $line1= $INIData[1][1] $line2= $INIData[2][1] $line3= $INIData[3][1] Edited April 8, 2008 by DarkMatter [sub]Quantum mechanics: The dreams stuff is made of[/sub] Link to comment Share on other sites More sharing options...
tobi2006 Posted April 8, 2008 Author Share Posted April 8, 2008 It works! 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