#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$h_Form = GUICreate("Тест ТС", 234, 106, 196, 113)
$v_Group_1 = GUICtrlCreateGroup(" Степень точности ", 8, 8, 217, 89)
$v_Group_2 = GUICtrlCreateGroup("", 144, 48, 49, 32)
$v_Label_1 = GUICtrlCreateLabel("Размер выборки", 32, 32, 90, 17)
$v_Label_2 = GUICtrlCreateLabel("=", 128, 58, 10, 17)
$v_Label_3 = GUICtrlCreateLabel('', 152, 58, 39, 20)
$v_Label_4 = GUICtrlCreateLabel("%", 200, 58, 12, 17)
$v_Input_1 = GUICtrlCreateInput('', 32, 56, 89, 21)
GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND')
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam)
Local $ID = BitAND($wParam, 0xFFFF)
Switch $hWnd
Case $h_Form
Switch BitShift($wParam, 16)
Case $EN_CHANGE
Switch $ID
Case $v_Input_1
$v_Summa_1 = Sqrt(GUICtrlRead($v_Input_1)+ 1)
$v_Summa_Itog = Execute(100/$v_Summa_1)
$v_Label_3 = GUICtrlCreateLabel(Round($v_Summa_Itog, 2), 152, 58, 39, 20)
EndSwitch
EndSwitch
EndSwitch
EndFunc