Jump to content

Recommended Posts

Posted

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
Posted

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
Posted

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.

Posted

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...
Posted

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 Abbreviations

it is very useful. so i will make it.

hmm, my english is very poor :)

do you understand? :D

Posted

i want to make autocomplete like scite autocomplete and Abbreviations

it is very useful. so i will make it.

hmm, my english is very poor  :)

do you understand?  :D

<{POST_SNAPBACK}>

Yeah i do :D but i don't understand were the words it compares with should come from?.. you are talking about something with a ini file..?
Posted

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 combo

2. i will send program to my friend.

3. friend makes inifile

ex)

[key]

abc=def

ai=atoit

btw=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"

Posted (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 by Wb-FreeKill
Posted

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. :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...