My plugin allows you to select a file and play it. In order to do that, I clear the PlayingNow list, add the selected file to it, then use the Playback.Play command. What happens is I get "There is nothing to play" but when I check the PlayingNow, the selected file is in there. Apparently, there is no default within PlayingNow, and the file within that list must be selected first, but I see no way of doing that. Can someone help me with code that will play a selected file? Here's what I have so far...
Set aFile = mFiles.GetFile(i)
Set aPlayback = g_MJ.GetPlayback
Set aPlayNow = g_MJ.GetCurPlaylist
aPlayNow.RemoveAllFiles
aPlayNow.AddFile aFile.Filename, 0
aPlayback.Play
As I said, this puts the correct file in PlayingNow, but generates a "There is nothing to play" error. I've tried it using the AddFromKey command too. There's no problem with getting it into the PlayingNow, only with playing it.
Thanks,
-Tano