It would be good if you post also the error code or screenshot of error you received so other viewers can respond to it or the mod. Thanks i'm also not a coder but I love to know how to solve this.tangonat wrote: ↑Tue May 08, 2018 7:23 pm The script below was provided by Loe. It is exactly what I want but when I try to run it in the scripts/Auto folder I get an error on execution. Since I am not a coder, I can't spot the error. Can anyone help? Many thanks.
Sub OnStartup
Script.RegisterEvent SDB, "OnPlay", "SkipBelowRating" 'Register SkipBelowRating on OnPlay event
End sub
Sub SkipBelowRating
Dim min_rating
min_rating = 16
If (SDB.Player.CurrentSong.Rating < min_rating) And (SDB.Player.CurrentSong.Rating > -1) Then
SDB.Player.Next
End If
End Sub
Skip songs with a rating of zero?
Moderator: Gurus
Re: Skip songs with a rating of zero?
Re: Skip songs with a rating of zero?
Try this:tangonat wrote: ↑Tue May 08, 2018 7:23 pm The script below was provided by Loe. It is exactly what I want but when I try to run it in the scripts/Auto folder I get an error on execution. Since I am not a coder, I can't spot the error. Can anyone help? Many thanks.
Sub OnStartup
Script.RegisterEvent SDB, "OnPlay", "SkipBelowRating" 'Register SkipBelowRating on OnPlay event
End sub
Sub SkipBelowRating
Dim min_rating
min_rating = 16
If (SDB.Player.CurrentSong.Rating < min_rating) And (SDB.Player.CurrentSong.Rating > -1) Then
SDB.Player.Next
End If
End Sub
Code: Select all
Sub OnStartup()
Script.RegisterEvent SDB, "OnPlay", "SkipBelowRating" 'Register SkipBelowRating on OnPlay event
End sub
Sub SkipBelowRating()
Dim min_rating
min_rating = 16
If (SDB.Player.CurrentSong.Rating < min_rating) And (SDB.Player.CurrentSong.Rating > -1) Then
SDB.Player.Next
End If
End Sub
Re: Skip songs with a rating of zero?
I think, just creating an auto-playlist with rating > (whatever) is the solution. You can also create a new collection in the same way.