ZanaxNL Posted September 6, 2010 Posted September 6, 2010 Hey, Which command i need to automatic scroll down when a new line is set in a GuiCreateEDIT ? Thanks : ) Zanax
BinaryBrother Posted September 6, 2010 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. SIGNATURE_0X800007D NOT FOUND
Mat Posted September 6, 2010 Posted September 6, 2010 You need the $ES_AUTOVSCROLL style set on the edit. AutoIt Project Listing
BinaryBrother Posted September 6, 2010 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... SIGNATURE_0X800007D NOT FOUND
ZanaxNL Posted September 7, 2010 Author 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
BinaryBrother Posted September 7, 2010 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 SIGNATURE_0X800007D NOT FOUND
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now