#include <GUIConstants.au3>
$hGUI = GUICreate('111', 200, 200)
$h_1 = GUICtrlCreateCheckbox('Soft 1', 10, 20, 100, 17)
$h_2 = GUICtrlCreateCheckbox('Soft 2', 10, 40, 100, 17)
$h_3 = GUICtrlCreateCheckbox('Soft 3', 10, 60, 100, 17)
$hProgress = GUICtrlCreateProgress(10, 80, 120, 17)
$hLabel = GUICtrlCreateLabel('Выберите софт и нажмите GO!', 10, 110, 180, 17)
$hButtonGo = GUICtrlCreateButton('go', 10, 140, 80, 25)
$hButtonQuit = GUICtrlCreateButton('quit', 100, 140, 80, 25)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE Or $msg = $hButtonQuit
Exit
Case $msg = $hButtonGo
GUISetState(@SW_DISABLE)
GUICtrlSetData($hProgress, 0)
If GUICtrlRead($h_1) = $GUI_UNCHECKED And GUICtrlRead($h_2) = $GUI_UNCHECKED And GUICtrlRead($h_3) = $GUI_UNCHECKED Then
MsgBox(0, 'Error', 'Ни одного пункта не выбрано!')
Else
If GUICtrlRead($h_1) = $GUI_CHECKED Then
GUICtrlSetData($hLabel, 'Устанавливаем софт №1')
; устанавливаем софт №1
If GUICtrlRead($h_2) = $GUI_CHECKED And GUICtrlRead($h_3) = $GUI_CHECKED Then
GUICtrlSetData($hProgress, 33)
ElseIf GUICtrlRead($h_2) = $GUI_CHECKED Or GUICtrlRead($h_3) = $GUI_CHECKED Then
GUICtrlSetData($hProgress, 50)
Else
GUICtrlSetData($hProgress, 100)
EndIf
GUICtrlSetData($hLabel, 'Софт №1 установлен')
EndIf
If GUICtrlRead($h_2) = $GUI_CHECKED Then
GUICtrlSetData($hLabel, 'Устанавливаем софт №2')
; устанавливаем софт №2
If GUICtrlRead($h_1) = $GUI_CHECKED And GUICtrlRead($h_3) = $GUI_CHECKED Then
GUICtrlSetData($hProgress, GUICtrlRead($hProgress) + 33)
ElseIf GUICtrlRead($h_1) = $GUI_CHECKED Or GUICtrlRead($h_3) = $GUI_CHECKED Then
GUICtrlSetData($hProgress, GUICtrlRead($hProgress) + 50)
Else
GUICtrlSetData($hProgress, 100)
EndIf
GUICtrlSetData($hLabel, 'Софт №2 установлен')
EndIf
If GUICtrlRead($h_3) = $GUI_CHECKED Then
GUICtrlSetData($hLabel, 'Устанавливаем софт №3')
; устанавливаем софт №3
If GUICtrlRead($h_1) = $GUI_CHECKED And GUICtrlRead($h_2) = $GUI_CHECKED Then
GUICtrlSetData($hProgress, GUICtrlRead($hProgress) + 33)
ElseIf GUICtrlRead($h_1) = $GUI_CHECKED Or GUICtrlRead($h_2) = $GUI_CHECKED Then
GUICtrlSetData($hProgress, GUICtrlRead($hProgress) + 50)
Else
GUICtrlSetData($hProgress, 100)
EndIf
GUICtrlSetData($hLabel, 'Софт №3 установлен')
EndIf
MsgBox(0, 'Done!', 'Весь выбранный софт установлен')
GUICtrlSetData($hProgress, 0)
GUICtrlSetData($hLabel, 'Выберите софт и нажмите GO!')
EndIf
GUISetState(@SW_ENABLE)
EndSelect
WEnd