dok_do Posted April 19, 2005 Share Posted April 19, 2005 i am a kerean, so english is very poor!! sorry.i want to make autocomplete-combo ,but it is difficult.i have visual-basic autocomplete-combo example. would you convert autoit? http://www.quickvb.com/Code/AutoCompleteCombo.htmAutoCompleteCombo.zip Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 19, 2005 Share Posted April 19, 2005 Do you want the combobox to finish something your are typing in it? or.. If so, you could do something like: #Include <GUIConstants.au3> GUICreate("GUI",200,200) $Combo = GUICtrlCreateCombo("",20,20,100,100) ; you type fx hello GUISetstate() While 1 Sleep(20) If GUICtrlRead($Combo) = "hel" then GUIctrlsetdata($Combo, "Hello") Wend Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 19, 2005 Share Posted April 19, 2005 Or this: #Include <GUIConstants.au3> GUICreate("GUI",200,200) $Combo = GUICtrlCreateCombo("",20,20,100,100) ; you type fx hello GUIctrlsetdata($Combo, "Hello1") GUIctrlsetdata($Combo, "Hello2") GUIctrlsetdata($Combo, "Hello3") GUISetstate() While 1 Sleep(20) If GUICtrlRead($Combo) = "hel" then GUIctrlsetdata($Combo, "Hello") Wend Link to comment Share on other sites More sharing options...
dok_do Posted April 19, 2005 Author Share Posted April 19, 2005 Or this:#Include <GUIConstants.au3> GUICreate("GUI",200,200) $Combo = GUICtrlCreateCombo("",20,20,100,100) ; you type fx hello GUIctrlsetdata($Combo, "Hello1") GUIctrlsetdata($Combo, "Hello2") GUIctrlsetdata($Combo, "Hello3") GUISetstate() While 1 Sleep(20) If GUICtrlRead($Combo) = "hel" then GUIctrlsetdata($Combo, "Hello") Wend<{POST_SNAPBACK}>hmm, thank you first user makes ini-file , and i will read ini-file.second, i will fills combo data.(using iniread() )so, i don't know user inifile. i want another sample. Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 19, 2005 Share Posted April 19, 2005 hmm, thank you firstĀ user makes ini-file , and i will read ini-file.second, i willĀ fills combo data.(using iniread() )so, i don't know user inifile. i want another sample.<{POST_SNAPBACK}>hmm, you have to be more specific... i understand that you want to set the data of the inifile to the combobox, but why? and what data... Link to comment Share on other sites More sharing options...
dok_do Posted April 19, 2005 Author Share Posted April 19, 2005 hmm, you have to be more specific... i understand that you want to set the data of the inifile to the combobox, but why? and what data...<{POST_SNAPBACK}>i want to make autocomplete like scite autocomplete and Abbreviationsit is very useful. so i will make it. hmm, my english is very poor do you understand? Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 19, 2005 Share Posted April 19, 2005 i want to make autocomplete like scite autocomplete and Abbreviationsit is very useful. so i will make it. hmm, my english is very poorĀ do you understand?Ā <{POST_SNAPBACK}>Yeah i do but i don't understand were the words it compares with should come from?.. you are talking about something with a ini file..? Link to comment Share on other sites More sharing options...
dok_do Posted April 19, 2005 Author Share Posted April 19, 2005 Yeah i doĀ Ā but i don't understand were the words it compares with should come from?.. you are talking about something with a ini file..?<{POST_SNAPBACK}>1. i will make autocomplete combo2. i will send program to my friend.3. friend makes inifile ex) [key]abc=defai=atoitbtw=by the way......4. program will read inifile.5. friend hits alphabet 'b' and it appear combo.i don't know inifile data. so, i don't use GUICtrlRead($Combo) = "hel" Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 19, 2005 Share Posted April 19, 2005 (edited) If i understand it right, it would be something like this: #Include <GUIConstants.au3> GUICreate("GUI",200,200) $Combo = GUICtrlCreateCombo("",20,20,100,100) ; you type fx hello Iniwrite("Names.ini","Shortnames","hel","Hello") Iniwrite("Names.ini","Shortnames","au","AutoIt") Iniwrite("Names.ini","Shortnames","abc","def") Iniwrite("Names.ini","Shortnames","btw","by the way") $IniRead = IniReadSection("Names.ini", "Shortnames") GUISetstate() While 1 Sleep(10) $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit For $i = 1 To $IniRead[0][0] If GUIctrlRead($Combo) = $IniRead[$i][0] Then $Read = IniRead("Names.ini","Shortnames",GUICtrlRead($Combo),"NotFound") GUIctrlsetdata($Combo, $Read) EndIf Next Wend Edited April 19, 2005 by Wb-FreeKill Link to comment Share on other sites More sharing options...
dok_do Posted April 19, 2005 Author Share Posted April 19, 2005 If i understand it right, it would be something like this:#Include <GUIConstants.au3> GUICreate("GUI",200,200) $Combo = GUICtrlCreateCombo("",20,20,100,100) ; you type fx hello Iniwrite("Names.ini","Shortnames","hel","Hello") Iniwrite("Names.ini","Shortnames","au","AutoIt") Iniwrite("Names.ini","Shortnames","abc","def") Iniwrite("Names.ini","Shortnames","btw","by the way") $IniRead = IniReadSection("Names.ini", "Shortnames") GUISetstate() While 1 Sleep(10) $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit For $i = 1 To $IniRead[0][0] If GUIctrlRead($Combo) = $IniRead[$i][0] Then $Read = IniRead("Names.ini","Shortnames",GUICtrlRead($Combo),"NotFound") GUIctrlsetdata($Combo, $Read) EndIf Next Wend<{POST_SNAPBACK}>Oh, Wb-FreeKill Thank you. you are very kind and smart man. Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 19, 2005 Share Posted April 19, 2005 Oh, Wb-FreeKillĀ Thank you. you are very kind and smart man. <{POST_SNAPBACK}>Kind yes, smart.. hmm in my own opinion, yes Well no problem... 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