Flashing at fixed time

I’m trying to make a script to give warning a minute before a soft fixed, hard fixed or backtimed item is supposed to be played. How do I find what the next fixed timing is and what the internal time is?

In mAirList 6.1 (earlier versions don’t support it):

CurrentPlaylist.GetNextFixedTime will return of the time of the next fix item, in Delphi’s TDateTime format: http://www.delphibasics.co.uk/RTL.asp?Name=TDateTime

Return value <0 indicates that there is no upcoming fixed time item.

CurrentPlaylist.GetNextFixedTimeItem will return the actual item (as IPlaylistItem reference), or nil of there is none.

Current time is just “now”: http://www.delphibasics.co.uk/RTL.asp?Name=Now

TDateTime is a floating point number, where 1 = one day. And one minute is 0.0006944444 = 1/(24*60). So your check is:

if (CurrentPlaylist.GetNextFixedTime >= 0) and (CurrentPlaylist.GetNextFixedTime - now < 0.0006944444) then begin
  ...
end;

Fantastic, worked wonderfully, only CurrentPlaylist didn’t work, but I used Playlist(0) instead and that was fine. Could it have not worked because I have multiple (3) Playlists in the same instance?

Also, I wanted this to work in relation to the current time in the mAirList (changable in the bottom of the screen)(for testing of course, makes it hard to test without), so I was hoping for an internal variable and not “now” that I know is a computer variable. How do I access the “now” that’s in the program itself?

EDIT: Found it, FakeNow is the internal now as the clock in the app shows it.

Use “Instance.FakeNow”.

And try “CurrentPlaybackControl” instead of “CurrentPlaylist”, that may give you access to the methods.