Due to popular demand, here’s some of the scripts I have lurking here…
Load Current Hour’s Playlist - for loading upon a restart or during the hour
[code]// Load the current hour’s Playlist
// Useful for logs created with StationPlaylist Creator
// by Charlie Davy
begin
Playlist(0).LoadFromM3U(‘C:\Playlists’ + FormatDateTime(‘ddd dd mmm - hh’, now) + ‘.m3u’);
SystemLog(‘Loaded Current Playlist ’ + FormatDateTime(‘ddd dd mmm - hh’, now) + ’ for playout/automation…’);
end.[/code]
Load Next Hour’s Playlist - suitable for running a few minutes before the hour
[code]// Load the next hour’s Playlist (current hour + 1)
// Useful for logs created with StationPlaylist Creator
// by Charlie Davy
begin
Playlist(0).LoadFromM3U(‘C:\Playlists’ + FormatDateTime(‘ddd dd mmm - hh’, now + 0.04166) + ‘.m3u’);
SystemLog(‘Loaded Next Playlist ’ + FormatDateTime(‘ddd dd mmm - hh’, now + 0.04166) + ’ for playout/automation…’);
end.
[/code]
Line Input Control
[code]// Open Line Input
// by Charlie Davy
// Mixer(0) is the default playback device as per Control Panel
// 12 is my Line Input “play through” mute option
// Yours may differ!
begin
Mixer(0).UnMute(0, 12);
SystemLog(‘Satellite Feed ACTIVE …’);
end.
// Close News Channel
// by Charlie Davy
begin
Mixer(0).Mute(0, 12);
SystemLog(‘Satellite Feed DISABLED …’);
end.[/code]
Load Tomorrow’s Playlist
begin
Playlist(0).LoadFromM3U('C:\PLAYLISTS\' + FormatDateTime('yyyymmdd', now + 0.04166) + '.m3u');
SystemLog('Loaded Next Playlist ' + FormatDateTime('ddd dd mmm - hh', now + 0.04166) + ' for playout/automation...');
end.
Load 2 advert playlists into Playlist 2+3 for split feeds
begin
Playlist(1).LoadFromM3U('C:\ADLOGS - FM\' + FormatDateTime('ddd dd mmm - hh', now) + '.m3u');
Playlist(2).LoadFromM3U('C:\ADLOGS - AM\' + FormatDateTime('ddd dd mmm - hh', now) + '.m3u');
SystemLog('Loaded Advert Playlists for playout/automation...');
end.
Set Item Attributes - the magic marker!
[code]// Set Item Attributes
// Remove the comments to perform a task
// by Charlie Davy
// Drag all common items into a Playlist and run this script
// Enable CueStart and FadeOut options for this to top and tail your audio
var
i: integer;
begin
for i := 0 to CurrentPlaylist.GetCount - 1 do
// If EndType is empty, then do it
//if CurrentPlaylist.GetItem(i).GetEndType = ‘o’ then
begin
// Set End Type to temporary - useful to indicate an automatically generated CueOut
//CurrentPlaylist.GetItem(i).SetEndType(‘e’);
// Set Playlist Icon
//CurrentPlaylist.GetItem(i).GetPicture.LoadFromFile(‘C:\Program Files\mAirList\icons\Icon - Advert.ico’);
//CurrentPlaylist.GetItem(i).GetPicture.LoadFromFile(‘C:\Program Files\mAirList\icons\Icon - Control.ico’);
//CurrentPlaylist.GetItem(i).GetPicture.LoadFromFile(‘C:\Program Files\mAirList\icons\Icon - Ident.ico’);
//CurrentPlaylist.GetItem(i).GetPicture.LoadFromFile(‘C:\Program Files\mAirList\icons\Icon - Pre Rec.ico’);
//CurrentPlaylist.GetItem(i).GetPicture.LoadFromFile(‘C:\Program Files\mAirList\icons\Icon - Promo.ico’);
//CurrentPlaylist.GetItem(i).GetPicture.LoadFromFile(‘C:\Program Files\mAirList\icons\Icon - Voicetrack.ico’);
//CurrentPlaylist.GetItem(i).GetPicture.LoadFromFile(‘C:\Program Files\mAirList\icons\Icon - Song.ico’);
// If you want to colour an item, use this line:
//CurrentPlaylist.GetItem(i).SetColored(true);
// Adverts and Promos
//CurrentPlaylist.GetItem(i).SetColor($80FF80);
//CurrentPlaylist.GetItem(i).SetArtist(‘Voicetrack’);
//CurrentPlaylist.GetItem(i).SetComment(‘This item can be overlayed with a song intro.’);
// Beds
//CurrentPlaylist.GetItem(i).SetColor($FFFF00);
// Jingles
//CurrentPlaylist.GetItem(i).SetColor($00FFFF);
// Pre Rec
//CurrentPlaylist.GetItem(i).SetColor($9EE0D3);
// VoiceTracks
//CurrentPlaylist.GetItem(i).SetColor($D3E09E);
//CurrentPlaylist.GetItem(i).SetColor($FF80FF);
// Save MMD Data File
//CurrentPlaylist.GetItem(i).SaveMMD;
end;
end.
[/code]