Page 1 of 1

Help with and Auto-Skip script

Posted: Sat Jul 05, 2014 5:52 pm
by scubanarc
Hey guys,

Apologies if this is the wrong sub. I'm new to the MediaMonkey scene.

I'd like to write a simple script that skips a track if "custom 1" has a certain value in it, let's say "true". I'm familiar with the event handlers example here: http://www.mediamonkey.com/wiki/index.p ... ers_script.

Do I need to use an event handler to do this? Can anyone provide me with some sample code to get me started? In pseudo-code what I want to do is:

if CurrentSong.Custom1 contains "true" then
SkipNext
end if

Any help is greatly appreciated.

Re: Help with and Auto-Skip script

Posted: Sun Jul 06, 2014 12:03 pm
by trixmoto
Yes, you'd want to use an "OnPlay" event, something like this...

Code: Select all

Call Script.RegisterEvent(SDB,"OnPlay","Event_OnPlay")

Sub Event_OnPlay()
  If SDB.Player.CurrentSong.Custom1 = "true" Then
    SDB.Player.Next
  End If
End Sub