Application.Caption logger

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15585
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Application.Caption logger

Post by ChrisGreaves »

I wrote this little utility to serve my audio jukebox/database/cataloguing application.

Periodically I sweep the database looking for aberrations - catalogued tracks that no longer exist, tracks that are not catalogued (that is, new files), and tracks, if any, with a zero-length duration.
For the short reports of various events, a ticker-tape-like caption is maintained across the top of the application.

Code: Select all

Public Const lngcCaptionLimit As Long = 220
'
Function CaptionLogger(strText As String)
    Dim strNewCaption As String
    strNewCaption = Application.Caption & "; " & strText
    strNewCaption = Right(strNewCaption, lngcCaptionLimit)
    Application.Caption = strNewCaption
'Sub TESTCaptionLogger()
'    Call CaptionLogger("first event")
'    Call CaptionLogger("second event")
'    Call CaptionLogger("third event")
'    Call CaptionLogger("fourth event")
'    Call CaptionLogger("fifth event")
'    Call CaptionLogger("sixth event")
'    Call CaptionLogger("seventh event")
'    Call CaptionLogger("eighth event")
'    Call CaptionLogger("ninth event")
'    Call CaptionLogger("tenth event")
'End Sub
End Function
I will probably meld this with my AMLog utility function which logs events to a text file (.LOG) and to the debug window.
Cheers, Chris
There's nothing heavier than an empty water bottle