aa2zz6, subz,
F.Y.I, SetSel is Not required. The third parm of GuiCtrlSetData ensures that the caret (insertion point) is always at the end...
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
#include <ScrollBarsConstants.au3>
#include <date.au3>
#AutoIt3Wrapper_Add_Constants=n
Local $gui010 = GUICreate('Edit Example')
$log1 = GUICtrlCreateEdit("", 20, 40, 170, 300)
$log2 = GUICtrlCreateEdit("", 210, 40, 170, 300)
Local $btn010 = GUICtrlCreateButton('Clear', 20, 360, 360, 20)
GUISetState()
AdlibRegister('Write_Log', 100)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $btn010
GUICtrlSetData($log1, '') ; <----- clear the logs
GUICtrlSetData($log2, '') ; <----- clear the logs
EndSwitch
WEnd
; fill the log up to show scrolling
Func Write_Log()
GUICtrlSetData($log1, _NowCalc() & @CRLF, 1)
GUICtrlSetData($log2, _NowCalc() & @CRLF, 1)
;$iEnd = StringLen(GUICtrlRead($gui010))
;_GUICtrlEdit_SetSel($gui010, $iEnd, $iEnd)
;_GUICtrlEdit_Scroll($log1, $SB_SCROLLCARET)
EndFunc ;==>Write_Log
kylomas
edit: None of the scrolling is required.