Gestalt 0 Posted September 9, 2010 How can I have the edit control automatically scroll to the very bottom of the control when the script is opened? I have tried doing a ControlSend("^{END}") but that doesn't work. I have looked at GUICtrlSendMsg and I didn't see anything that would help. Is this possible? Share this post Link to post Share on other sites
enaiman 16 Posted September 9, 2010 - get the length of the text in the edit box - set selection from last character - to - last character - replace selection with new content That way it will scroll "up". #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiEdit.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 625, 373, 192, 124) $Edit1 = GUICtrlCreateEdit("", 16, 16, 593, 305) GUICtrlSetData(-1, "") $Button1 = GUICtrlCreateButton("Test Me", 272, 336, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 For $i = 1 To 40 _EditScrollUp("Example Line "&$i&@CRLF) Sleep(200) Next EndSwitch WEnd Func _EditScrollUp($content) Local $Ed_length = StringLen(GUICtrlRead($Edit1)) _GUICtrlEdit_SetSel($Edit1, $Ed_length, $Ed_length) _GUICtrlEdit_ReplaceSel($Edit1, $content) EndFunc SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example scriptwannabe "Unbeatable" Tic-Tac-ToePaper-Scissor-Rock ... try to beat it anyway :) Share this post Link to post Share on other sites
Gestalt 0 Posted September 10, 2010 Thank you for the code, enaiman. I am at home and only have Linux computers but I will try it when I get back to work. I appreciate your help. Share this post Link to post Share on other sites