JohnOne Posted February 13, 2010 Share Posted February 13, 2010 (edited) I was looking for some scrolling test function, but could not find exactly what I needed, so attemped to make my own. I want to use it just as a sort of log of my running code or live log if you will. Its suposed to just add the log item ($Newdata) to the bottom of the gui and scroll it up as it revieves newdata. My problem is that there is two duplicate lines at the bottom, and I cant get why? Here is my code expandcollapse popup#include <Guiconstants.au3> Global $aGuiData Global $Gui Global $Newdata Func _GuiCreate(ByRef $aGuiData) $Gui = GUICreate("Test", 400, 400, 500, 100) Local $a = 0 For $i = 5 To 290 Step 15 $aGuiData[$a] = GUICtrlCreateLabel($a, 5, $i, 390, 20) $a += 1 Next GUISetState() EndFunc ;==>_GuiCreate Func _UpdateGui($Newdata) Local $temp For $i = 0 To 18 $temp = GUICtrlRead($aGuiData[$i + 1]) GUICtrlSetData($aGuiData[$i], $temp) GUICtrlSetData($aGuiData, $Newdata) Next EndFunc ;==>_UpdateGui _GuiCreate($aGuiData) For $i = 20 To 100 Sleep(200) _UpdateGui($i) Next While 1 Sleep(50) $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Its crappy looking too, so if someone can point me toward a better approach I would appreciate it. Edited February 13, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
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 account
Already have an account? Sign in here.Sign In Now