#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
Local $hGUI = GUICreate("Приложение на autoit",500,500)
GUICtrlCreateLabel("Введите текст", 10, 0,150,25)
Local $idInput_1 = GUICtrlCreateInput("", 10, 25, 500, 20)
Local $clicked= GUICtrlCreateButton("Выбрать цифры", 10, 100,150,25)
GUISetState(@SW_SHOW, $hGUI)
While 1
$msg = GUIGetMsg()
if $msg = $GUI_EVENT_CLOSE then
ExitLoop
endif
if $msg = $clicked then
$word = GUICtrlRead($idInput_1)
$newword = ""
for $i = 1 to StringLen($word)
if Asc(StringMid($word,$i,1)) >= 48 and Asc(StringMid($word,$i,1)) <= 57 then
$newword = $newword & StringMid($word,$i,1)
endif
next
GUICtrlSetData($idInput_1,"")
GUICtrlSetData($idInput_1,$newword)
endif
WEnd
|