#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("primer", 149, 132, 303, 219) $Button1 = GUICtrlCreateButton("Calc", 24, 24, 97, 57, 0) $input = GUICtrlCreateInput("2.082", 24, 96, 97, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Button1 $target = GUICtrlRead ($input) lenght_analiz ($target) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func lenght_analiz ($len_a) MsgBox(4096, "step 1", "Nachinaem rabotat s chislom: " & $len_a) $ostatok_1 = Round ($len_a) MsgBox(4096, "step 2", "Okruglili do celogo, poluchili: " & $ostatok_1) $ostatok_2 = $len_a - $ostatok_1 MsgBox(4096, "step 3", "Vichli iz nachalnogo okrugjennuju chast, poluchili: " & $ostatok_2) $ostatok_3 = StringTrimLeft ($ostatok_2, 2) MsgBox(4096, "step 4", "Otkusili sleva 2 znaka, poluchili: " & $ostatok_3) $result = StringLen($ostatok_3) MsgBox(4096, "Test", "Kol-vo znakov posle zapjatoj (tochki): " & $result) Exit EndFunc |