Jump to content

Recommended Posts

Posted

I can get the msgbox display the selection from box 1 or box 2 but not from both

$Combo1 = GUICtrlCreateCombo("", 10, 10, 200, 240, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL,$WS_GROUP))
GUICtrlSetTip(-1, "Select the building with the emergency")
GUICtrlSetFont(-1, 10, 400, 0, "Times New Roman")
GUICtrlSetData(-1, "1|2|3|4|5")

$Combo2 = GUICtrlCreateCombo("", 10, 40, 200, 240, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL,$WS_GROUP))
GUICtrlSetTip(-1, "Select the building with the emergency")
GUICtrlSetFont(-1, 10, 400, 0, "Times New Roman")
GUICtrlSetData(-1, "1|2|3|4|5")

$ok1 = GUICtrlCreateButton ("OK",  25, 70, 50)
GUICtrlSetOnEvent(-1, "OKPressed")
GUICtrlCreateButton ( "Cancel",  140, 70, 60)

GUISetState(@SW_SHOW)
$win_pos = WinGetPos($Gui)
$tmp_pos = $win_pos

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
    EndSelect
Wend

Func OKPressed()
    msgbox(0,"box name", GUICtrlRead($Combo1))
EndFunc

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
×
×
  • Create New...