Hey Leute,
gibt es eine coole UDF oder Snippet zu einem Live-Log :)?
Ich habe mir das mit nem List-Element umgesetzt
Spoiler anzeigen
$sSpace = " "
$listLog = GUICtrlCreateList($sSpace & "Log <- Hier halte ich dich up2date! ->", 50, 480, 520, 100, BitOR($WS_BORDER, $WS_VSCROLL, $LBS_NOTIFY, $LBS_DISABLENOSCROLL, $LBS_NOSEL), $WS_EX_WINDOWEDGE)
GUICtrlSetFont(-1, 7)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetColor(-1, 0xFFFFFF)
Func _log($text)
FileWrite($file, _NowTime() & " -> " & $text & @CRLF)
$aResult = StringRegExp($text, ".{85,105} (.)", 3)
If Not @error Then
GUICtrlSetData($listLog, _NowTime() & " -> " & StringReplace($text, $aResult[0], "|" & $aResult, 1) & "|")
Else
GUICtrlSetData($listLog, _NowTime() & " -> " & $text & "|")
EndIf
_GUICtrlListBox_SetTopIndex($listLog, _GUICtrlListBox_GetCount($listLog) - 1)
EndFunc ;==>_log
Das sieht auch ganz nett aus, allerdings wird der String ja, wenn er zu lang ist, getrennt und in die nächste Zeile geschrieben. Allerdings sieht das dann ja so aus:
Zitat___________________________________Log <- Hier halte ich dich up2date! ->
11:35:51 -> Blablablablablablab
BlablablablablablabBlablablablablablabBlablablablablablabBlablablablablablabBlablablablablablabBlablablablablablab!
Und das nervt micht :D... Aber mit Leerzeichen ausrichten klappt auch nicht "ordentlich" ausgerichtet... Und meine Trenn-Funktion scheint auch nicht immer sauber zu arbeiten...^^ Jemand ne Idee :)?
LG
Aca