However, it can fire even if a track's properties have not changed, in the following circumstances: if one track's properties are changed, then the event will fire for every consecutive track whose properties are subsequently viewed until the track properties window is closed.
Steps to reproduce:
1) Save the following code to a .vbs file in %AppData%\Roaming\MediaMonkey\Scripts\Auto and restart MediaMonkey
Code: Select all
Option Explicit
Sub OnStartUp
Dim i : i = SDB.UI.AddPropertiesSheet("Test sheet", Script.ScriptPath, "InitSheet", "TrackChange", "SaveSheet", 1)
End Sub
Dim InEventHandler : InEventHandler = False
Script.RegisterEvent SDB, "OnTrackProperties", "Event_OnTrackProperties"
Sub InitSheet(Sheet)
End Sub
Sub TrackChange( Object, ObjectType)
End Sub
Sub SaveSheet(Sheet, Object, ObjectType)
End Sub
Sub Event_OnTrackProperties(SongList)
If InEventHandler Then Exit Sub
InEventHandler = True
SDB.MessageBox "Track properties changed: " & SongList.Item(0).Title, mtInformation, Array(mbOk)
InEventHandler = False
End Sub3) Click one of the "update and previous/next song" buttons.
4) Observe that the event fires, correctly.
5) Click one of the "update and previous/next song" buttons one or more times, followed by the OK button, without making any changes.
6) Observe that the event fires each time, even though the 2nd and subsequent tracks' properties were not changed.
I have tested this on the latest stable and beta builds available today (4.0.7.1511 and 4.1.0.1622 dev build).