SaeidN

ComboBox

7 posts in this topic

Let's say I have 10 combobox and 10 items in each.

1- If one item in a combobox is selected, I don't want it to be selectable in another combobox. (Or if it is, remove the duplicate one)

2- When I click on button, I want 10 msgboxes to show, and each item showing in each msgbox in order they are selected. (from combobox1 to combobox10)

I'm confused whether to use select or switch or other loops.

Share this post


Link to post
Share on other sites



SaeidN,

You might find this thread of interest. If you produce some runnable code to illustrate what you want to do I would be happy to develop something along those lines for you.

M23

1 person likes this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites
2 hours ago, Melba23 said:

SaeidN,

You might find this thread of interest. If you produce some runnable code to illustrate what you want to do I would be happy to develop something along those lines for you.

M23

Thank you, that was a good guide. This code is a good one, but I don't want to be removed from the list, I want when a duplicate option is selected, the old one to get unselected from combobox.

I have this code. When I click the button, I want the selected items to run in order they are selected. I have a number from 1 to 9 in front of each, which means wait for 1-9 sec, then run the next one.

I appreciate your help

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("RunProgs", 373, 283, 192, 124)
Global $Combo1 = GUICtrlCreateCombo("", 24, 40, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Notepad|Paint|Calc|IE|AutoIt")
Global $Combo2 = GUICtrlCreateCombo("", 24, 72, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Notepad|Paint|Calc|IE|AutoIt")
Global $Combo3 = GUICtrlCreateCombo("", 24, 104, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Notepad|Paint|Calcu|IE|AutoIt")
Global $Combo4 = GUICtrlCreateCombo("", 24, 136, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Notepad|Paint|Calc|IE|AutoIt")
Global $Combo5 = GUICtrlCreateCombo("", 24, 168, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Notepad|Paint|Calc|IE|AutoIt")
Global $Combo6 = GUICtrlCreateCombo("", 200, 40, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9")
Global $Combo7 = GUICtrlCreateCombo("", 200, 72, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9")
Global $Combo8 = GUICtrlCreateCombo("", 200, 104, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9")
Global $Combo9 = GUICtrlCreateCombo("", 200, 136, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9")
Global $Combo10 = GUICtrlCreateCombo("", 201, 168, 143, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9")
Global $RunBtn = GUICtrlCreateButton("Run selected in order", 112, 216, 131, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

SaeidN,

Quote

I want when a duplicate option is selected, the old one to get unselected from combobox

Is this the behaviour you wish to see - any previous selections of the same app or order are cleared:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ComboConstants.au3>

#include <Array.au3>

Global $iCount = 5

Global $sCombo_Data = "|Notepad|Paint|Calc|IE|AutoIt" ; Note use of leading "|" so that previous loads are cleared
Global $sCombo_Order = "|1|2|3|4|5|6|7|8|9"
Global $aCombo_App[$iCount], $aCombo_Place[$iCount]
Global $iStyle = BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)


$Form1 = GUICreate("RunProgs", 373, 283, 192, 124)

For $i = 0 To $iCount - 1
    $aCombo_App[$i] = GUICtrlCreateCombo("", 24, 40 + (32 * $i), 145, 25, $iStyle)
    GUICtrlSetData(-1, $sCombo_Data)
    $aCombo_Place[$i] = GUICtrlCreateCombo("", 200, 40 + (32 * $i), 145, 25, $iStyle)
    GUICtrlSetData(-1, $sCombo_Order)
Next

$RunBtn = GUICtrlCreateButton("Run selected in order", 112, 216, 131, 41)

GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $RunBtn

        Case Else
            For $i = 0 To $iCount -1
                ; Check if App combo
                If $nMsg = $aCombo_App[$i] Then
                    ; Recent app selection
                    $sChosen = GUICtrlRead($nMsg)
                    ; Now check all other combos and clear them if the same thing selected
                    For $j = 0 To $iCount - 1
                        If $j = $i Then
                            ; Do nothing
                        Else
                            ; Same content as recent selection
                            If GUICtrlRead($aCombo_App[$j]) = $sChosen Then
                                ; Clear the current combo selection
                                GUICtrlSetData($aCombo_App[$j], $sCombo_Data)
                            EndIf
                        EndIf
                    Next
                ElseIf $nMsg = $aCombo_Place[$i] Then
                    ; Recent order selection
                    $sChosen = GUICtrlRead($nMsg)
                    ; Now check all other combos and clear them if the same thing selected
                    For $j = 0 To $iCount - 1
                        If $j = $i Then
                            ; Do nothing
                        Else
                            ; Same content as recent selection
                            If GUICtrlRead($aCombo_Place[$j]) = $sChosen Then
                                ; Clear the current combo selection
                                GUICtrlSetData($aCombo_Place[$j], $sCombo_Order)
                            EndIf
                        EndIf
                    Next
                EndIf
            Next

    EndSwitch
WEnd

Or do you mean that once an option is chosen it is removed from the other combos options?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ComboConstants.au3>

Global $iCount = 5

Global $sCombo_Data = "|Notepad|Paint|Calc|IE|AutoIt" ; Note use of leading "|" so that previous loads are cleared
Global $sCombo_Order = "|1|2|3|4|5|6|7|8|9"
Global $aCombo_App[$iCount], $aCombo_Place[$iCount], $aCombo_App_Data[$iCount], $aCombo_Place_Data[$iCount]
Global $iStyle = BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)

For $i = 0 To $iCount - 1
    $aCombo_App_Data[$i] = $sCombo_Data
    $aCombo_Place_Data[$i] = $sCombo_Order
Next

$Form1 = GUICreate("RunProgs", 373, 283, 192, 124)

; Initial fill
For $i = 0 To $iCount - 1
    $aCombo_App[$i] = GUICtrlCreateCombo("", 24, 40 + (32 * $i), 145, 25, $iStyle)
    GUICtrlSetData(-1, $sCombo_Data)
    $aCombo_Place[$i] = GUICtrlCreateCombo("", 200, 40 + (32 * $i), 145, 25, $iStyle)
    GUICtrlSetData(-1, $sCombo_Order)
Next

$RunBtn = GUICtrlCreateButton("Run selected in order", 112, 216, 131, 41)

GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $RunBtn

        Case Else
            For $i = 0 To $iCount -1
                ; Check if App combo
                If $nMsg = $aCombo_App[$i] Then
                    ; Recent app selection
                    $sChosen = GUICtrlRead($nMsg)
                    ; Now remove from all other combos
                    For $j = 0 To $iCount - 1
                        If $j = $i Then
                            ; Do nothing
                        Else
                            ; Read current content of combo and add a trailing "|"
                            $sContent = $aCombo_App_Data[$j] & "|"
                            ; Remove chosen item and trim trailing "|"
                            $aCombo_App_Data[$j] = StringTrimRight(StringReplace($sContent, "|" & $sChosen & "|", "|"), 1)
                            ; Read current setting
                            $sCurrent = GUICtrlRead($aCombo_App[$j])
                            ; And reload combo
                            GUICtrlSetData($aCombo_App[$j], $aCombo_App_Data[$j], $sCurrent)
                        EndIf
                    Next
                ElseIf $nMsg = $aCombo_Place[$i] Then
                    ; Recent order selection
                    $sChosen = GUICtrlRead($nMsg)
                    ; Now remove from all other combos
                    For $j = 0 To $iCount - 1
                        If $j = $i Then
                            ; Do nothing
                        Else
                            ; Read current content of combo and add a trailing "|"
                            $sContent = $aCombo_Place_Data[$j] & "|"
                            ; Remove chosen item and trim trailing "|"
                            $aCombo_Place_Data[$j] = StringTrimRight(StringReplace($sContent, "|" & $sChosen & "|", "|"), 1)
                            ; Read current setting
                            $sCurrent = GUICtrlRead($aCombo_Place[$j])
                            ; And reload combo
                            GUICtrlSetData($aCombo_Place[$j], $aCombo_Place_Data[$j], $sCurrent)
                        EndIf
                    Next
                EndIf
            Next

    EndSwitch
WEnd

M23

Edited by Melba23
Added second script
1 person likes this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

10 hours ago, Melba23 said:

 

The first one is exacty what I want. Thank you.

How can I get the Run button to work? Should I use switch? Cause I want all selected programs to run with the defined sleep between them.

Edited by Melba23
Removed huge quote

Share this post


Link to post
Share on other sites

SaeidN,

When you reply, please use the "Reply to this topic" button at the top of the thread or the "Reply to this topic" editor at the bottom rather than the "Quote" button - I know what I wrote and it just pads the thread unnecessarily.

As to the "Run" button - what have you tried that has not worked? I would have thought a loop would have been the way to go rather then a Switch, but then you know best what you want.

M23

 


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Sorry about quote.

Edit: Ok, I did it, is it an efficiet way of doing it? Or there is a better way? I just wrote it for two of the apps for now.

$z= 0
            While $z < 5

                If GUICtrlRead($aCombo_App[$z]) = "Calc" Then
                    Run ("calc.exe")
                    Sleep (GUICtrlRead($aCombo_Place[$z]) * 1000)
                EndIf

                If GUICtrlRead($aCombo_App[$z]) = "Notepad" Then
                    Run ("notepad.exe")
                    Sleep (GUICtrlRead($aCombo_Place[$z]) * 1000)
                EndIf
                $z= $z+1
            WEnd

Edit 2: I removed the following part, cause it's a sleep time and ok to duplicate in boxes.

ElseIf $nMsg = $aCombo_Place[$i] Then
                    ; Recent order selection
                    $sChosen = GUICtrlRead($nMsg)
                    ; Now check all other combos and clear them if the same thing selected
                    For $j = 0 To $iCount - 1
                        If $j = $i Then
                            ; Do nothing
                        Else
                            ; Same content as recent selection
                            If GUICtrlRead($aCombo_Place[$j]) = $sChosen Then
                                ; Clear the current combo selection
                                GUICtrlSetData($aCombo_Place[$j], $sCombo_Order)
                            EndIf
                        EndIf
                    Next

 

Edited by SaeidN

Share this post


Link to post
Share on other sites

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

  • Similar Content

    • FMS
      When select combobox change input field
      By FMS
      Hello,

      I've writing this code and I'm a little stuck in what i want to do.
      When I select the combobox I want to get the ini information inside the multiline input field.
      I know that what I'm doing now is wrong but maybe this helps to clearify things in what I want to do.
      Does somebody knows how to do this , or can help me?
       
       
      #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <File.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <Array.au3> #include <Date.au3> check_file_exist() $Form1 = GUICreate("Form1", 320, 260, 192, 324);(b,h,,),30 $Tab1 = GUICtrlCreateTab(5, 5, 310, 250) ;(,,b,h) $TabSheet3 = GUICtrlCreateTabItem("Edit") $Label_tab_select = GUICtrlCreateLabel("select", 40, 50, 80, 25) $tab_select = GUICtrlCreateCombo(" tab 1", 40, 70, 80, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, " tab 2") $Label_BtnSelect = GUICtrlCreateLabel("nr", 125, 50, 80, 25) $BtnSelect = GUICtrlCreateCombo(" 1", 125, 70, 60, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, " 2 ") $Label_BtnName = GUICtrlCreateLabel("name", 190, 50, 80, 25) $BtName = GUICtrlCreateInput("", 190, 70, 80, 21) $multiline = GuiCtrlCreateEdit("this text needs to be changed at selection of combobox",15, 105, 290, 110) ;the next line is to clearify things :) ;$multiline = GuiCtrlCreateEdit(IniRead($ini_location_buttons, "btn00" & GUICtrlRead($BtnSelect), "text"),15, 105, 290, 110) $Btn301 = GUICtrlCreateButton("Cancel", 40, 220, 75, 25) $Btn302 = GUICtrlCreateButton("Save", 152, 220, 75, 25) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Btn301 Exit Case $Btn302 Exit EndSwitch WEnd Func check_file_exist() If FileExists(@SCRIPTDIR & "\ini.ini") Then Global $ini_location_buttons = @SCRIPTDIR & "\ini.ini" Else If Not _FileCreate(@SCRIPTDIR & "\buttons.ini") Then MsgBox($MB_SYSTEMMODAL, "Error", " Error Creating/Resetting ini. error:" & @error) Else Global $ini_location_buttons = @SCRIPTDIR & "\ini.ini" create_new_ini() EndIf EndIf EndFunc Func create_new_ini() $file = FileOpen($ini_location_buttons, 1) Local $i = 1 local $j = 0 Do if $i = 10 then $j = "" FileWrite($file, "[btn0" & $j & $i & "]"& @CRLF) FileWrite($file, "button_name=Button " & $i & @CRLF) FileWrite($file, "text=lorum ipsum" & $i & @CRLF) $i = $i + 1 Until $i = 3 FileClose($file) EndFunc  
    • InunoTaishou
      Mimicking Wordpad using RichEdit
      By InunoTaishou
      As the title implies, trying to mimic Microsoft Word (Older version) using RichEdit. Not an easy task, it's not even 1/10th of what word really is but I wanted to make a small text editor (That supported changing an individual word/letters properties). Some of the functions I wanted to use didn't have a whole lot of information/topics about them so I spent many many hours trying to figure out how to do some things... (Like getting the text from a ExComboBox or changing the color of the rich edit text without changing ALL of the rich edit text (Turns out I just needed to update my AutoIt version....))
      Some of the things I struggled with was reading the Font Size from the ComboBoxEx (GUICtrlRead and ControlGetText do not work, by themselves, but if you use _GUICtrlComboBoxEx_GetEditControl to get the GUICtrlID of the ComboBoxEx you can use ControlGetText), trying to track a Popup menu for the font size (I didn't want to use a dropdown menu, trying to use the scroll wheel to increment/decrement the text in the ComboBoxEx, making sure the correct attribute buttons are Checked depending on the location of the caret (This isn't 100% perfect, I got it to pretty much work though... I originally had it checking the letter 1 left of the caret all the time, except when the caret is at the 0,0 mark, but if the caret is at the very end and the user presses one of the attribute buttons, it won't keep the button checked correctly). There are a few other things but I can't think of them. I don't know enough about the WinAPI in order to make a truly amazing wordpad but maybe this will help some others out there trying to use some of the controls I used.
       
      Also, this was actually made to be attached (_WinAPI_SetParent($frmEditor, WinGetHandle("[Class:LWJGL]")) to a game I play (PokeMMO), so there may be some remnants of the game stuff in here. I don't think so, but there might be... It still functions properly.
      (There is no gameplay automation, it's just supposed to be a child of the game and work as a simple text editor. I've currently submitted it to one of mods of the game so I can release it to the community)
      Beginnings of a Wordpad.rar
    • kneze
      read local Groups of remote Computer add to Combobox
      By kneze
      Hi
      i try to read existing local Groups of remote computer and add to Combobox so i can select a Group to
      get members and add to $ListMembers. Does anyone have a solution how i can read existing local Groups of remote computer and add to Combobox?
       
      thanks.
       
      #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Add / Remove Members", 615, 432, 196, 128) GUISetBkColor(0xFFFFFF) $Group1 = GUICtrlCreateGroup("", 8, 8, 289, 185) GUICtrlSetFont(-1, 10, 800, 0, "Arial") $LabelCpname = GUICtrlCreateLabel("CP Name:", 16, 32, 81, 23) GUICtrlSetFont(-1, 12, 800, 0, "Arial") $InputCpname = GUICtrlCreateInput("", 16, 56, 129, 30) GUICtrlSetFont(-1, 14, 800, 0, "Arial") $LabelLocalGroups = GUICtrlCreateLabel("Local Groups", 16, 96, 107, 20) GUICtrlSetFont(-1, 12, 800, 0, "Arial") $ComboGroups = GUICtrlCreateCombo("", 16, 152, 273, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetFont(-1, 14, 800, 0, "Arial") GUICtrlSetBkColor(-1, 0xFFFF00) $ButtonReadGroups = GUICtrlCreateButton("read local Groups", 160, 56, 130, 25) $ButtonReadmembers = GUICtrlCreateButton("read Members", 16, 120, 130, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("User", 8, 200, 289, 89) GUICtrlSetFont(-1, 10, 800, 0, "Arial") $LabelUserID = GUICtrlCreateLabel("User ID:", 16, 224, 66, 23) GUICtrlSetFont(-1, 12, 800, 0, "Arial") $InputComputer = GUICtrlCreateInput("", 88, 216, 89, 30) GUICtrlSetFont(-1, 14, 800, 0, "Arial") $ButtonAdd = GUICtrlCreateButton("Add User", 184, 216, 100, 25) $ButtonRemove = GUICtrlCreateButton("Remove user", 184, 248, 100, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) $ListMembers = GUICtrlCreateList("", 304, 16, 305, 409) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select ;Case $GUI_EVENT_CLOSE Case $msg = $GUI_EVENT_CLOSE Exitloop Case $msg = $ButtonReadGroups MsgBox(0, "Note", "Button 'read Groups' not work !") Case $msg = $ButtonReadmembers ;MsgBox(0, "Note", "Button 'Read Members' not work !") GUICtrlSetData($ListMembers, "") Local $readCombo = GuiCtrlRead($ComboGroups) GUICtrlSetData($ListMembers, $readCombo) Case $msg = $ButtonAdd MsgBox(0, "Note", "Button 'Add User' not working !") Case $msg = $ButtonRemove MsgBox(0, "Note", "Button 'Remove User' not working !") EndSelect WEnd func terminate() ;exit Exit 0 EndFunc  
    • digitalexpl0it
      Ini to combo box
      By digitalexpl0it
      hello,
      I am having an issue were I am trying to pull everything under a section in a INI file into a combobox.Issue I have is it only selects 2 out of the list. Not sure why
       
      func _ReadHistory() Local Const $sFilePath = "history1.ini" Local $iFileExists = FileExists($sFilePath) ; If the INI file is not found, output error message If not $iFileExists Then msgbox(0,"Oh NO!", $sFilePath & " not found!") endif Local $aArray = IniReadSection($sFilePath, "RemoteHistory") ; Start the array loop and run robocopy If Not @error Then for $i = 0 to $aArray[0][0] _GUICtrlComboBox_InsertString($rdesktopInput, $aArray[$i][1], 0) $i = $i +1 next endif endfunc INI FILE Example [RemoteHistory] HOST=12.12.12.12 HOST=127.0.0.1 HOST=10.10.10.1 HOST=192.168.1.1 HOST=0.0.0.0  
    • Skysnake
      [solved] sqlite rowid to combobox
      By Skysnake
      Hi all
      I am comfortable with SQL and doing okay with Lists, ListViews and Comboboxes.  What I need to do is this: READ row from SQL, place SOME of this row into a combo list, MODIFY data in the Combo, READ the Combo and WRITE back to SQL as an update.
      So, I want to modify existing SQL data in a combo box and then update the SQL to reflect the combo changes.
      My specific problem, is that I do not know how to handle the rowid in the combo environment.  I do not want to show it to the user.
      I have another project where the ID is in fact displayed on screen in the combo, so there it is easy, read the value and run an update.  Now, I need to hide the ID from the user, but not lose it.
      Help? Suggestions? Examples?  I have been searching for some time now, but can't find any related posts.
      Thanks for reading