ZanaxNL 0 Posted September 6, 2010 Hey, Which command i need to automatic scroll down when a new line is set in a GuiCreateEDIT ? Thanks : ) Zanax Share this post Link to post Share on other sites
BinaryBrother 27 Posted September 6, 2010 Take a look at. _GUICtrlEdit_Scroll($hWnd, $iDirection) _GUICtrlRichEdit_ScrollLines($hWnd, $iQlines) _GUICtrlRichEdit_ScrollLineOrPage($hWnd, $sAction) The help file is full of various ways to accomplish that. _GUICtrlEdit_AppendText($hWnd, $sText) May scroll to the bottom automatically as well... I can't remember. WM8650 Tablet Disassembly Video Share this post Link to post Share on other sites
Mat 376 Posted September 6, 2010 You need the $ES_AUTOVSCROLL style set on the edit. AutoIt Project Listing Share this post Link to post Share on other sites
BinaryBrother 27 Posted September 6, 2010 You need the $ES_AUTOVSCROLL style set on the edit.I was looking for that... Yea, that's definitely the best way... WM8650 Tablet Disassembly Video Share this post Link to post Share on other sites
ZanaxNL 0 Posted September 7, 2010 Ok thanks for reply's but the problem was. let giv my scirpt a part: $edit = GUICtrlCreateEdit("[" & $Time & "]" & " #### at"& @CRLF & "[" & $Time & "]" & " ####", 16, 200, 217, 46, $WS_VSCROLL + $ES_READONLY + $ES_AUTOVSCROLL) And then (if button is pressed) If $x=1 Then guictrlsetdata($edit,guictrlread($edit)& @CRLF & "[" & $Time & "]" & " Started" ) endif But how i he autoscroll down, when new line is set? Thanks!! already Zanax Share this post Link to post Share on other sites
BinaryBrother 27 Posted September 7, 2010 (edited) #include <WindowsConstants.au3> #include <EditConstants.au3> $Time = "3:45PM" $GUI = GUICreate("Title", 300, 300) $Edit = GUICtrlCreateEdit("[" & $Time & "]" & " #### at"& @CRLF & "[" & $Time & "]" & " ####", 0, 0, 300, 300, $WS_VSCROLL + $ES_READONLY + $ES_AUTOVSCROLL) GUISetState(@SW_SHOW, $GUI) While 1 Sleep(500) GUICtrlSetData($Edit, "Alright" & @CRLF, 1) WEndThe above script scrolls properly... The only difference I see is that your not using the last parameter inGUICtrlSetData()... Which should be set to "1" which will actually "append" the text. As shown in the help-file.GUICtrlSetData ( controlID, data [, default] )default [optional] Combo, List: The default value.Edit, Input: If non-empty (""), the string is inserted at the current insertion point (caret). Edited September 7, 2010 by BinaryBrother WM8650 Tablet Disassembly Video Share this post Link to post Share on other sites