7 posts in this topic
I'm working on a little project, and I was wondering if there's a way ( sure there is ) to insert data to a ComboBox control everytime the user insert some text in the ComboBox which is not in the ComboBox data. I'll try to explain with an example:
- Form with some data ( ComboBox is empty );
- User prompt something in the ComboBox: if what the user prompts is not in the ComboBox values ( at the moment empty ), then insert the value in the ComboBox values, in order to have, next time the user prompts the form, the value that he entered.
More pratical example:
- First call of the form, ComboBox empty;
- I prompt "A" in the ComboBox;
- Second call, in the ComboBox I should see "A";
- I prompt "B" in the ComboBox;
- Third call, I should see "A"
- And so on...
Everytime the form is called, I re-create it, so I think I can't use _GUICtrlComboBox_AddStrings().
I tried with
Global $strCboStrings = "" ; When the user prompt the form, the code below is executed. ; I.E. : User prompt "A", after the if I should have "A"; ; In the second call, If I write "B", I should see "A" ; "B"; ; If I write "A" again, in the combobox values should not be any changes. If Not StringInStr($strCboStrings, GUICtrlRead($cboVoiceCategory)) <> 0 Then $strCboStrings &= $strCboStrings & "|" & GUICtrlRead($cboVoiceCategory) EndIf Any suggestion?
hello Comunity i am new to autoit and i bump into a pitfall regarding the creation of objects in a dinamyc way but more especific creating combobox at runtime
i need many comboboxes and sofar i createdthem manually
$idCombo_1 = GUICtrlCreateCombo("", 500, 40, 130, 21) $idCombo_2 = GUICtrlCreateCombo("", 500, 70, 130, 21) $idCombo_3 = GUICtrlCreateCombo("", 500, 100, 130, 21) $idCombo_4 = GUICtrlCreateCombo("", 500, 130, 130, 21) $idCombo_5 = GUICtrlCreateCombo("", 500, 160, 130, 21) $idCombo_6 = GUICtrlCreateCombo("", 500, 190, 130, 21) $idCombo_7 = GUICtrlCreateCombo("", 500, 220, 130, 21) $idCombo_8 = GUICtrlCreateCombo("", 500, 250, 130, 21) $idCombo_9 = GUICtrlCreateCombo("", 500, 280, 130, 21) GUICtrlSetData($idCombo_1, "Item1|Item2|Item3|Item4|Item5") GUICtrlSetData($idCombo_2, "Item1|Item2|Item3|Item4|Item5") GUICtrlSetData($idCombo_3, "Item1|Item2|Item3|Item4|Item5") GUICtrlSetData($idCombo_4, "Item1|Item2|Item3|Item4|Item5") GUICtrlSetData($idCombo_5, "Item1|Item2|Item3|Item4|Item5") GUICtrlSetData($idCombo_6, "Item1|Item2|Item3|Item4|Item5") GUICtrlSetData($idCombo_7, "Item1|Item2|Item3|Item4|Item5") GUICtrlSetData($idCombo_8, "Item1|Item2|Item3|Item4|Item5") GUICtrlSetData($idCombo_9, "Item1|Item2|Item3|Item4|Item5") now i need this example but create them at runtime as there are more than 9 combos what i need thanks in advance kind regards
Good morning community!
I am working on a script which read from a text file ( .txt ) and should import all the content in a SQLite3 DB, in order to execute some queries that should be difficult to execute on a text file.
So, I was looking for something very very fast, because the file could be very large ( I don't know exaclty how much can became big, but I know a lot of rows, it's a log file ... )
I found the "Import method", but I don't know If I can implement it in a query ( @jchd, it's your turn! )
Do you know some methods that I can implement in my script to have a very very fast import of thousands and thousands rows in a SQLite3 DB?
Thanks a lot
Good morning guys
I was trying to use again SQLite in AutoIt, and I've again an issue: I can't startup SQLite...
Can you please show me the way to set the enviornment for a SQLIte usage in AutoIt? Step by step, I'll follow your suggestion(s).
Thanks for everyone will reply!
Hi huys !
how are you ? family ? dog, cat ? well..
I've got a problem: _GUICtrlComboBox_GetCueBanner
i can't get it to work.
Simple: even the example from help does'nt work...
I insist, it's excactly the example from the help, no modifications
#include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $g_idMemo Example() Func Example() Local $idCombo ; Create GUI GUICreate("ComboBox Get Count", 400, 296) $idCombo = GUICtrlCreateCombo("", 2, 2, 396, 296) _GUICtrlComboBox_SetCueBanner($idCombo, "Select an Item") $g_idMemo = GUICtrlCreateEdit("", 10, 50, 376, 234, $WS_VSCROLL) GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New") GUISetState(@SW_SHOW) ; Add files _GUICtrlComboBox_BeginUpdate($idCombo) _GUICtrlComboBox_AddDir($idCombo, @WindowsDir & "\*.exe") _GUICtrlComboBox_EndUpdate($idCombo) MemoWrite("Cue Banner: " & _GUICtrlComboBox_GetCueBanner($idCombo)) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example ; Write a line to the memo control Func MemoWrite($sMessage) GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1) EndFunc ;==>MemoWrite I also added the display of the cuebanner in the loop.
It never display what actually appears in the combo
If you can show me any king of working example.
Thanks Guys !
Actually autoit v188.8.131.52