#include #include #include Global Const $sVeryLongText = "AutoIt v3 is a freeware BASIC-like scripting" _ & " language designed for automating the Windows GUI and general scripting." _ & " It uses a combination of simulated keystrokes, mouse movement and" _ & " window/control manipulation in order to automate tasks in a way not" _ & " possible or reliable with other languages (e.g. VBScript and SendKeys)." _ & " AutoIt is also very small, self-contained and will run on all versions" _ & " of Windows out-of-the-box with no annoying “runtimes” required!" Example() Func Example() Local $hGui, $hRichEdit, $iMsg $hGui = GUICreate("Example (" & StringTrimRight(@ScriptName, StringLen(".exe")) _ & ")", 320, 200, -1, -1) ; RichEdit is not very high, so a scrollbar can appear, even with little text. $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 100, _ BitOR($ES_MULTILINE, $WS_VSCROLL)) GUISetState(@SW_SHOW) ; After the GUI is visible, add some text so we have something to scroll. _GUICtrlRichEdit_AppendText($hRichEdit, @CRLF & "More text" & @CRLF & "1 - 2") _GUICtrlRichEdit_AppendText($hRichEdit, @CRLF & @CRLF & $sVeryLongText) While True $iMsg = GUIGetMsg() Select Case $iMsg = $GUI_EVENT_CLOSE GUIDelete() ; is OK too Exit EndSelect WEnd EndFunc ;==>Example