|
发表于 2009-12-31 21:44:27
|
显示全部楼层
和楼上一个思路的另一个写法:
#Include <GuiEdit.au3>
#Include <ScrollBarConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 313, 150, 226, 375)
$Edit1 = GUICtrlCreateEdit("", 8, 8, 289, 130)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
For $i = 1 To 30
_write()
Next
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _write()
GUICtrlSetData($Edit1,GUICtrlRead($Edit1) & "这是行 " & $i & @CRLF) ;----------------这个方法很有用的,楼主应该能明白什么意思吧
;~ _GUICtrlEdit_Scroll($Edit1, $SB_SCROLLCARET) ;----------滚动到最底部
_GUICtrlEdit_LineScroll($Edit1, 0, _GUICtrlEdit_GetLineCount($Edit1)) ;----------这句也是滚动到最底部
Sleep(50)
EndFunc |
|