Hi, I am trying to get an old script from Charlie Davy to run on V5 build 2524. I have changed the old Mu3 to MLP and have the location of my playlist files but get the error message: Error running script:{Error} (7.13): unknown identifier ‘LOADFROMMLP’. I am not a script writer but trying to learn as a lot of mAirlist seems to need scripts to do things! Any advice please?
In current mAirList, use LoadFromFile(filename) - it will detect the format automatically, based on the extension.
If you need more help, please post the original source code as well.
Hi Torben, sorry for the long delay in following this up! Do I have to save each hour as a playlist for this script to find it or should it read from the database? Charlie Davy’s code is:
begin
Playlist(0).LoadFromFile('J:\playlists ’ + FormatDateTime(‘ddd dd mmm - hh’, now) + ‘.MLP’);
SystemLog(‘Loaded Current Playlist ’ + FormatDateTime(‘ddd dd mmm - hh’, now) + ’ for playout/automation…’);
end.
Sorry but I really struggle with scripts!
That code from Charlie is for loading scripts from a file, from disk, apparently.
What are you trying to accomplish anyway? Load the playlist for the current hour into the playout window?
CurrentPlaylist.Assign(Databases(0).GetPlaylist(now, 0));
That should work.
Hi Torben, what I was looking for was a script that would load the playlist for the current hour and go to the correct item for the current time, ie, 50.30, then start automation with no other buttons to select.
Thanks for your help.