
Sub DoRandomise(p)
Dim t : Set t = p.Tracks
Dim a : a = ""
p.Clear
While t.Count > 0
Dim n : n = Int(t.Count*Rnd)
If Not (a = t.Item(n).ArtistName) Then
a = t.Item(n).ArtistName
Call p.AddTrack(t.Item(n))
Call t.Delete(n)
End If
SDB.ProcessMessages
WEnd
End Sub







Users browsing this forum: No registered users and 10 guests