i want to write a script which saves my actual playlist after some event occurs, e.g. a new song is added or after a period of time. the same routine MM do after exit itself.
i hope you understand my problem
i´m new in scripting and so my snippet looks like this
Code: Select all
songcount = 0
Sub OnStartup
Set Tmr = SDB.CreateTimer( 20000)
Script.RegisterEvent Tmr, "OnTimer", "CheckSongCount"
CheckSongCount()
End Sub
Sub CheckSongCount
songtemp = SDB.Player.PlaylistCount
If(songtemp =Not 0) Then
songcount = songtemp
SavePlaylist()
End If
End Sub
Sub SavePlaylist
//some code here
End Sub
"error executing script event"
i have NO idea where´s the error....or whats wrong. have you some hints?
