Здравствуйте, пытаюсь сделать так чтобы при выборе RadioButton в ComboBox подставлялось значение из того или иного ini-файла. И при нажатии на кнопку выполнялось 2 действия: 1 - то, что выбрано в RadioButton, 2 - то, что выбрано в ComboBox.
Например в RadioButton вывод сообщения (сообщение 1), а при выборе определенного параметра из ini вывод сообщения(выполнил 1 пункт из ini файла)
Вот, что есть:
Спасибо за помощь!
Например в RadioButton вывод сообщения (сообщение 1), а при выборе определенного параметра из ini вывод сообщения(выполнил 1 пункт из ini файла)
Вот, что есть:
Код:
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiComboBox.au3>
$Form1_1 = GUICreate("Form1", 354, 572, 821, 257)
$Button1 = GUICtrlCreateButton("Button1", 24, 520, 129, 25)
$Combo1 = GUICtrlCreateCombo("", 16, 208, 153, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL, $CBS_DROPDOWNLIST))
GUISetState(@SW_SHOW)
Global $Radio1 = GUICtrlCreateRadio("Выбор1", 8, 24, 135, 16)
Global $Radio2 = GUICtrlCreateRadio("Выбор2", 8, 55, 135, 16)
$INI1 = IniRead(@ScriptDir & '\1.ini', 'commands', 'key', '')
$INI2 = IniRead(@ScriptDir & '\2.ini', 'drivers', 'key2', '')
Func SetButtonState()
if GUICtrlRead($Radio1) = $GUI_CHECKED _
Then
_GUICtrlComboBox_ResetContent($Combo1)
GuiCtrlSetData($Combo1, $INI1, StringLeft($INI1, StringInStr($INI1&'|', '|')-1))
Else
if GUICtrlRead($Radio2) = $GUI_CHECKED _
Then
_GUICtrlComboBox_ResetContent($Combo1)
GuiCtrlSetData($Combo1, $INI2, StringLeft($INI2, StringInStr($INI2&'|', '|')-1))
EndIf
EndIf
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Case $Radio1
SetButtonState()
Case $Radio2
SetButtonState()
EndSwitch
WEnd
Спасибо за помощь!