#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Local $mytext_1 = "Некоторый текст1"
Local $mytext_2 = "Некоторый текст2"
Local $hGUI = GUICreate("Работа с текстом",700,500)
Local $myedit = GUICtrlCreateEdit ($mytext_1 , 0, 0,700,200)
Local $mybutton1 = GUICtrlCreateButton ("сохранить текст 1", 0, 300,180,40)
Local $mybutton2 = GUICtrlCreateButton ("сохранить текст 2", 180, 300,180,40)
Local $mybutton3 = GUICtrlCreateButton ("вставить текст 1", 0, 400,180,40)
Local $mybutton4 = GUICtrlCreateButton ("вставить текст 2", 180, 400,180,40)
GUISetState(@SW_SHOW, $hGUI)
While 1
$msg = GUIGetMsg()
if $msg = $GUI_EVENT_CLOSE then
ExitLoop
endif
if $msg = $mybutton1 then
$mytext_1 = GUICtrlRead($myedit)
endif
if $msg = $mybutton2 then
$mytext_2 = GUICtrlRead($myedit)
endif
if $msg = $mybutton3 then
GUICtrlSetData($myedit,$mytext_1)
endif
if $msg = $mybutton4 then
GUICtrlSetData($myedit,$mytext_2)
endif
WEnd
|