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