Jump to content

scruiD

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by scruiD

  1. Okay I have a scroll bar that I can manually scroll down to the end ot he log so I see the last logfile updates then. Is there a way to autoscroll to bottom. Find a function like this only for a listview, but that I won't have - just simple, show the most current content of the textfile written on the end of it. It seems there is no autoscroll builtin for it?
  2. Perfect! Thx! Exactly what I was looking for - just a bit confused about to use Input for an output
  3. Hi there, I am new here and were looking for a solution but did not find in my combination so I assume my code or logic isn't the best. short: I have a logfile written on the harddrive, that I do read to an label and if the labelcontent has changed (logfile has new lines) it refreshes the label. My Problem is, when the textfile is too big, it does not display the end of the textfile, how can I make it happen that it always displays the end of the textfile? What I have so far (Sorry if too much or too stupid, I am still learning #include <GuiConstantsEx.au3> #include <ButtonConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <File.au3> #include <Constants.au3> #include <GUIConstantsEx.au3> ; Definitionen Dim $Logfile_Displayed $GFX_Splash=FileFindFirstFile("C:\splash.jpg") $GFX_Warning=FileFindFirstFile("C:\warning.jpg") $GUI_Label=GUICtrlCreatelabel("", 10, 300, 620, 200) Splashscreen() GUI_APP() While 1 if GUIGetMsg() = -3 then Exit GUI_Update() WEnd func GUI_Update() $Logfile=("C:\update.log") $Logfile_Open=FileOpen ($Logfile,0) $Logfile_Read=FileRead($Logfile_Open) FileClose($Logfile) FileClose($Logfile_Open) If $Logfile_Read <> $Logfile_Displayed then GUICtrlSetFont(-1, 11) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlCreatelabel($Logfile_Read, 30, 100, 480, 270) $Logfile_Displayed=$Logfile_Read GUISetState(@SW_SHOW) Sleep(4000) EndIf FileFlush($Logfile_Read) EndFunc func Splashscreen() If FileExists($GFX_Splash) Then SplashImageOn("UpdateLog for incoming files", $GFX_Splash, 640, 480) Sleep(3000) SplashOff() EndIf EndFunc func GUI_APP() GuiCreate("Log", 640, 480) GuiCtrlCreateTab(1, 0, 640, 480) GuiCtrlCreateTabItem("Status") GUICtrlCreateGroup("Update Progress", 5, 25, 520, 410) EndFunc Thx for any help
×
×
  • Create New...