#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Программа", 617, 449, 192, 114)
$Label1 = GUICtrlCreateLabel("text", 40, 32, 25, 17)
$Label2 = GUICtrlCreateLabel("text", 40, 88, 25, 17)
$Input1 = GUICtrlCreateInput("", 72, 32, 121, 21)
$Input2 = GUICtrlCreateInput("", 72, 88, 113, 21)
$Button1 = GUICtrlCreateButton("Сохранить txt в", 344, 32, 105, 25)
$Label3 = GUICtrlCreateLabel("Сохранить txt в", 456, 40, 80, 17)
$Button2 = GUICtrlCreateButton("Запустить", 344, 80, 105, 25)
$Edit1 = GUICtrlCreateEdit("", 8, 128, 601, 305)
GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GUICtrlSetOnEvent($Button2, "poehali")
$times = 1
$start = False
While 1
Sleep(36000)
If $start and $times <= 100 Then
GUICtrlSetData ($Edit1, $times & "%..." & @CRLF, "1")
$times = $times + 1
$str = ""
For $i=0 To 8
$str = $str & Chr(Random(224, 255, 1))
Next
GUICtrlSetData($Input1, $str)
$str = ""
For $i=0 To 8
$str = $str & Chr(Random(224, 255, 1))
Next
GUICtrlSetData($Input2, $str)
EndIf
If $times = 100 Then
GUICtrlSetState($Button2, $GUI_ENABLE)
EndIf
WEnd
Func CLOSEClicked()
Exit
EndFunc
Func poehali()
GUICtrlSetState($Input1, $GUI_DISABLE)
GUICtrlSetState($Input2, $GUI_DISABLE)
GUICtrlSetData($Edit1, "")
$times = 1
GUICtrlSetData ($Edit1, "Извлечение...." & @CRLF & "0%..." & @CRLF, "1")
GUICtrlSetState($Button2, $GUI_DISABLE)
$start = True
$str = ""
For $i=0 To 8
$str = $str & Chr(Random(224, 255, 1))
Next
GUICtrlSetData($Input1, $str)
$str = ""
For $i=0 To 8
$str = $str & Chr(Random(224, 255, 1))
Next
GUICtrlSetData($Input2, $str)
EndFunc