gcue Posted February 24, 2009 Share Posted February 24, 2009 i have a combo that is created with this function Func MustHave_LoadCombo() $cfgs = _FileListToArray(@ScriptDir & "\cfg", "*.cfg") If @error = 1 Then Return "No assets loaded" EndIf For $c = 1 To $cfgs[0] $file &= $cfgs[$c] & "|" Next Return $file EndFunc ;==>MustHave_LoadCombooÝ÷ Û^'^ë^jxzh)¶Þ¶(º0Ømêkzø¨ºËÚç¬)î²Ø^צ;¬µ×¥z×½êÈë]ºbq«^½©nzÈ^íý²0jÞx-ç(ººÚ"µÍQÕRPÝÙ]]J ÌÍÓ]Ý]WÐÑ×ØÛÛXË ][ÝÉ][ÝÊHÙYÝYÈÛÝ[[]H[H[YÂQÕRPÝÙ]]J ÌÍÓ]Ý]WÐÑ×ØÛÛXË ][ÝÔÙ[XÝÛÛYÝ][Û ][ÝÈ [È]Ý]WÓØYÛÛXÊ K ][ÝÔÙ[XÝÛÛYÝ][Û][ÝÊHÝ[XÜX]H[HHH]]ÈY[ÈÈHKY^Ý[ÈÛ any ideas? Link to comment Share on other sites More sharing options...
Skruge Posted February 24, 2009 Share Posted February 24, 2009 I don't have any real combo'ed GUIs to play with right now, but maybe ControlCommand...DelString, _GUICtrlComboBox_DeleteString, or _GUICtrlComboBox_ResetContent would do the trick? [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
martin Posted February 24, 2009 Share Posted February 24, 2009 From the help For Combo or List control : If the "data" corresponds to an already existing entry it is set as the default. If the "data" starts with GUIDataSeparatorChar or is an empty string "" the previous list is destroyed. 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...
gcue Posted February 24, 2009 Author Share Posted February 24, 2009 martin! =) hmm thats what i thought i did when i did this... GUICtrlSetData($MustHave_CFG_combo, "") Link to comment Share on other sites More sharing options...
martin Posted February 24, 2009 Share Posted February 24, 2009 martin! =) hmm thats what i thought i did when i did this... GUICtrlSetData($MustHave_CFG_combo, "")So try this $setdata = MustHave_LoadCombo() ConsoleWrite($setdata & @CR);<-----------see if your function is the problem GUICtrlSetData($MustHave_CFG_combo, "Select Configuration...|" & $setdata, "Select Configuration...") 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...
Moderators Melba23 Posted February 24, 2009 Moderators Share Posted February 24, 2009 (edited) gcue, Like martin, I am certain it is a problem in deleting the item from the list that you pass to the combo. After deleting the corresponding element in the array, the following code works perfectly for me:; Refill combo $sFolder_List = "" For $i = 1 To $aFolder_List[0][0] $sFolder_List &= $aFolder_Array[$i][0] & "|" Next GUICtrlSetData($hMusic_Folder_Combo, "") GUICtrlSetData($hMusic_Folder_Combo, $sFolder_List) M23 Edit: I have just seen Jos' post here which shows the "correct" syntax. Edited February 24, 2009 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
gcue Posted February 24, 2009 Author Share Posted February 24, 2009 So try this $setdata = MustHave_LoadCombo() ConsoleWrite($setdata & @CR);<-----------see if your function is the problem GUICtrlSetData($MustHave_CFG_combo, "Select Configuration...|" & $setdata, "Select Configuration...") looks like it is a script issue, im getting duplicates in the consolewrite also =/ Link to comment Share on other sites More sharing options...
gcue Posted February 24, 2009 Author Share Posted February 24, 2009 sorry here's the code im using to populate the combo: Func MustHave_LoadCombo() $cfgs = _FileListToArray(@ScriptDir & "\cfg", "*.cfg") If @error = 1 Then Return "No assets loaded" EndIf For $c = 1 To $cfgs[0] $file &= $cfgs[$c] & "|" Next Return $file endfunc Link to comment Share on other sites More sharing options...
gcue Posted February 24, 2009 Author Share Posted February 24, 2009 gcue, Like martin, I am certain it is a problem in deleting the item from the list that you pass to the combo. After deleting the corresponding element in the array, the following code works perfectly for me:; Refill combo $sFolder_List = "" For $i = 1 To $aFolder_List[0][0] $sFolder_List &= $aFolder_Array[$i][0] & "|" Next GUICtrlSetData($hMusic_Folder_Combo, "") GUICtrlSetData($hMusic_Folder_Combo, $sFolder_List) M23 Edit: I have just seen Jos' post here which shows the "correct" syntax. couldnt get this to work... =/ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 24, 2009 Moderators Share Posted February 24, 2009 gcue, Try emptying $file each time you call the function:Func MustHave_LoadCombo() $cfgs = _FileListToArray(@ScriptDir & "\cfg", "*.cfg") If @error = 1 Then Return "No assets loaded" EndIf $file = "" ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< For $c = 1 To $cfgs[0] $file &= $cfgs[$c] & "|" Next Return $file endfunc M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
gcue Posted February 24, 2009 Author Share Posted February 24, 2009 brilliant!!! works like a charm - thank you thank you =) 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