More examples and a suggestion
More examples
Why not putting error messages in the lower edit box, instead of calling MessageBox() all the time. Very nasty if script contains a lot of errors (not that I have a lot of errors in my scripts).
More examples
Suggestioncode:
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const LogFile = "c:\songlog.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
Sub WAObj_ChangedTrack
Dim s, text
s = playlist(playlist.position).ATFString("%artist% - %album% '('%filename%')'")
If Not fso.FileExists(LogFile) Then
Set text = fso.CreateTextFile(LogFile)
Else
Set text = fso.OpenTextFile(LogFile, ForAppending)
End If
text.WriteLine s
text.Close
End Sub
Why not putting error messages in the lower edit box, instead of calling MessageBox() all the time. Very nasty if script contains a lot of errors (not that I have a lot of errors in my scripts).
Comment