I’m developping our all new scheduled programs on Station Playlist Creator. In some of the clocks I’ve created, i’ve inserted a BREAK Command - for the live shows by example.

This is working perfectly. The only precaution I have to take is to be aware of the fact that, maybe once a year, a presenter won’t be able to do his show. If so, the Break Command will execute and no DJ will be there to push the play button again…

I’ve had the idea of ‘skipping the break’ or ‘loading another playlist’ if the Off Air Switch is on.

So, I have the detect this BREAK Command.

I’ve tried to do it with the OnExecuteCommand but the BREAK doesn’t seem to be concidered as a proper command. The same for the OnAutomationChange.

Have you got an idea ?


This is just off the top of my head, but I think you should be able to use a Notification Script and OnBeforePlayerStop, then check the top Item in the Playlist for Title = ‘BREAK’.

Though Torben may have a better solution. ;D


You could also replace the break item by a command item which calls the following script (“RUNSCRIPT <filename.mls>”), which does the same as the break command, but only when the on air status is true:

  if Engine.GetOnAir then

I have not tried this script, and I cannot promise that it works (controlling the automation from within the automation update loop, which calls the script, is always a tricky thing), but it’s worth a try.

To include the command item into the playlist, let Creator write the following line into the M3U output:

#mAirList COMMAND RUNSCRIPT c:\wherever\filename.mls

Thanks Torben for this solution,

It works like a charm.


I have a small problem with this one… I tried a variation of it and whilst the script turns off the automation, it plays the next item ???

Switch Off-Air: Live-Assist (stop at breaks)
Switch On-Air: Autopilot (ignore breaks)

begin if Engine.GetOnAir = False then PlaybackControl(0).SetAutomation(false); end.

The example below shows that the script is being a bit “lazy” (I tried to think of a technical term and failed)…
COMMAND (the above code)
AD <- plays this file then waits for user input

I note, Charlie, that your code is effectively ‘clicking ASSIST’ rather than ‘clicking Playlist STOP.’ That would explain why Automation is starting the following item before Automation stops.

It’s an easy fix, too: just copy the line from Torben’s code and put it before your existing SetAutomation(false) line.


That’s right - if the OnAirSwitch is set to OffAir, then it waits… if it’s “OnAir”, then it carries on past each Presenter Break…Thing is, when I tried Torben’s code - it faded out the item, which isn’t really a) professional or b) what I wanted :frowning:

I’ll need to think more about that one, Charlie!

I think I see the ‘Catch-22’ but I’m not sure I know how to prevent it.

One question for you: if you ARE stopping the Playlist (in OFF AIR), do you want the Playlist to be in ASSIST or AUTO mode after the BREAK/STOP/whatever? I think I need the answer to that before I can work out some potential solutions.