Jump to content

jeepjep

Members
  • Posts

    4
  • Joined

  • Last visited

Community Answers

  1. jeepjep's post in Create inputbox based on ComboBox contents with modification was marked as the answer   
    I managed to get it working.  It was not pretty code, but it works.  I created an array of the combobox, then concatenated my numeric variable to the beginning of each item and stored it in my concatenated variable.
    not runnable code but the meat and potatoes of the section.  I was not creating a combobox, I was reading from an existing combobox and trying to display that information in an inputbox.
    still probably not clear to someone I am trying to explain to, but I got it working.  I appreciated the input and will try to be more clear on my issue next time!
            $var = ControlGetHandle("Student Information", "&To School Of Attendance", "ComboBox2") ;handle to combobox         $count = _GUICtrlComboBox_GetCount($var) ;get the count in the combobox         Local $array[$count + 1 ]          $test = _GUICtrlComboBox_GetListArray($var) ; testing         Local $Concatenated = ""         $x = 1         $i = 0             For $loop = 1 To $count ;5                 $array[$i] = $x & ": " & $test[$x]                 $Concatenated &= $array[$i] & @CRLF ;testing stringing together appended number and combobox item                 $x = $x + 1 ; not pretty but works                 $i = $i + 1 ; not pretty but works            Next         $choose = InputBox("Bell", "Choose Bell time: Type number based on line number: (1-" & $count & ")" & @LF & @LF & $Concatenated & @LF & @LF & "________________________________________________________" & @LF & "Informational Section Only, Number input based on times ABOVE line" & @LF & @LF & $program, $default, "", 525, 375)         If @error = 1 Then             $cancelpressed = 1             Return         EndIf  
×
×
  • Create New...