Adapt old script

Hi,
I’m transferring all my old script to a new installation of mAirList 4, and of course , scripts have evolved since 2007 :slight_smile:
I’m wondering how to append a playlist to the CurrentPlaylist?
The following lines do not work any more: “Unknown identifier: APPENDPLAYLIST”

CurrentPlayList.Appendplaylist(Factory.CreatePlayListFromFile(‘E:\mairlist misc\Playlists\11hc.mlp’));
CurrentPlayList.Appendplaylist(Factory.CreatePlayListFromFile(‘E:\StationPlaylist\Playlist’ + FormatDateTime(‘yymmdd-hh’, now + 0.04166) + ‘.m3u’));

I’m not sure what function can now be substituted for APPENDPLAYLIST.

Any help would be really appreciated, and sorry for asking such a basic question!

Georges

Try AppendList.

It’s simply “Append” now. Try this:

CurrentPlayList.Append(Factory.CreatePlayListFromFile('E:\mairlist misc\Playlists\11hc.mlp'), true);

The second parameter specifies how playlist-level metadata should be handled - doesn’t really matter here if you use true or false.

Great, thanks for the help!!
Georges