Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Новый участник


Сообщения: 3
Благодарности: 0

Профиль | Отправить PM | Цитировать


Цитата Creat0R:
Скорее всего нужно так: »
не совсем то что хотелось.
немного переделал (мне новичку читается легче).
но всё равно спасибо. помог.
Скрытый текст


Код: Выделить весь код
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiComboBox.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 302, 111, 192, 114)
$Combo1 = GUICtrlCreateCombo("яблоко", 8, 8, 139, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "шарик|вода|трава|изолента")
$Button1 = GUICtrlCreateButton("Button1", 192, 24, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            If _GUICtrlComboBox_GetCurSel($Combo1) = 0 Then
                $msg = ("красное")
            ElseIf _GUICtrlComboBox_GetCurSel($Combo1) = 1 Then
                $msg = ("круглый")
            ElseIf _GUICtrlComboBox_GetCurSel($Combo1) = 2 Then
                $msg = ("мокрая")
            ElseIf _GUICtrlComboBox_GetCurSel($Combo1) = 3 Then
                $msg = ("зелёная")
            Else
            $msg = ("синяя")
            EndIf
            start1()
            start2()
    EndSwitch
WEnd

  Func start1()
MsgBox (0,"info1", $msg  )
  endFunc

  Func start2()
MsgBox (0,"info2", $msg  )
  endFunc

Последний раз редактировалось Alkogolik, 26-05-2020 в 17:25. Причина: в теги Autoit


Отправлено: 17:08, 26-05-2020 | #5