INTERACT FORUM

Windows => Plug-in Development => Topic started by: dreicher on September 24, 2004, 03:18:23 pm

Title: VB Plug-In - Create New Playlist
Post by: dreicher on September 24, 2004, 03:18:23 pm
I'm trying to create a playlist from an interface plug-in, without much luck. Any help would be greatly appreciated...

Private Sub savePlaylist(tracks As String)
'On Error Resume Next
     Dim newPlaylist As MediaJukebox.MJPlaylistAutomation
   
     newPlaylist = g_MJ.GetPlaylists.CreatePlaylist("", "Name")
     newPlaylist.AddFile "F:\CD\Christina Aguilera\Stripped\01 - Beautiful.mp3", -1
     newPlaylist.AddFile "F:\CD\Christina Aguilera\Stripped\02 - Fighter.mp3", -1
End Sub

The playlist gets created in the proper spot in MC then an error is raised without any music being added. Any thoughts would be greatly appreciated.

Dan
Title: Re:VB Plug-In - Create New Playlist
Post by: dreicher on September 24, 2004, 03:30:09 pm
Sorry - ignore the idiot. Forgot to set the object.

Private Sub savePlaylist(tracks As String)
'On Error Resume Next
    Dim newPlaylist As MediaJukebox.MJPlaylistAutomation
   
    Set newPlaylist = g_MJ.GetPlaylists.CreatePlaylist("", "Name")
    newPlaylist.AddFile "F:\CD\Christina Aguilera\Stripped\01 - Beautiful.mp3", -1
    newPlaylist.AddFile "F:\CD\Christina Aguilera\Stripped\02 - Fighter.mp3", -1
End Sub

Dan