In all simplicity, something like this before the line UB=SDB.Play....
Code: Select all
LoadPlaylist=InputBox("Load Playlist","MediaMonkey")
If Not LoadPlaylist="" Then
SDB.Player.PlaylistClear
SDB.Player.PlaylistAddTracks(SDB.PlaylistByTitle(LoadPlaylist).Tracks)
End If
would ask you for what playlist to load, and if you write the name right it will load. This could be 'scripted up' a bit so you get to click a list instead of writing the name.
The MM Developers made a beautiful 'Load Playlist' dialog in the AutoDJ part, and making something like that in scripting would take a bit of effort... as far as I know this beauty cannot be called by scripting
However, just hitting F12 will give you the playlist in the Tree, so it's not far away really.
BTW, if you just want to 'Hard Code' it to a certain playlist, I guess this would be enough
Code: Select all
SDB.Player.PlaylistClear
SDB.Player.PlaylistAddTracks(SDB.PlaylistByTitle("WriteNameOfPlaylistHere").Tracks)
First line to clear the Now Playing list
Second line you replace the text WriteNameOfPlaylistHere with your playlist name
In all simplicity, something like this before the line UB=SDB.Play....
[code]LoadPlaylist=InputBox("Load Playlist","MediaMonkey")
If Not LoadPlaylist="" Then
SDB.Player.PlaylistClear
SDB.Player.PlaylistAddTracks(SDB.PlaylistByTitle(LoadPlaylist).Tracks)
End If[/code]
would ask you for what playlist to load, and if you write the name right it will load. This could be 'scripted up' a bit so you get to click a list instead of writing the name.
The MM Developers made a beautiful 'Load Playlist' dialog in the AutoDJ part, and making something like that in scripting would take a bit of effort... as far as I know this beauty cannot be called by scripting
However, just hitting F12 will give you the playlist in the Tree, so it's not far away really.
BTW, if you just want to 'Hard Code' it to a certain playlist, I guess this would be enough
[code]SDB.Player.PlaylistClear
SDB.Player.PlaylistAddTracks(SDB.PlaylistByTitle("WriteNameOfPlaylistHere").Tracks)[/code]
First line to clear the Now Playing list
Second line you replace the text WriteNameOfPlaylistHere with your playlist name