Jump to content

Whats wrong with this script


jenni

Recommended Posts

I tried to use a script for the following:

 

Play the script only between Monday and Friday at certain time (It shouldnot close on saturday and sunday)

Load the url then the news jingle mp3 on top

Play the mp3 file

fade to play the url (which is a news url)

News is about 15 min.

After 15 minute (18:52:55) it should fade to play the next track.

BUT The problem is: It putting the url and jingle mp3 over and over again and play them in a loop.

Instead of playing the next track after the news url link.

Any Help Please:

 

Thanks in advance..

jenni

 

 

Pal.Loop := True;

 

PAL.WaitForTime(T['18:37:00']);

 

if ((DayOfWeek(Now) >= Monday) and (DayOfWeek(Now)

begin

//Queue.Clear;

Queue.AddFile('http://s1.xx.net:7000/',ipTop);

Queue.AddFile('C:\Radio\Jingles\NewsJingle.mp3',ipTop);

//Start playback

PAL.WaitForTime(T['18:37:25']);

ActivePlayer.FadeToNext;

end;

if ((DayOfWeek(Now) = Saturday)) then

begin

PAL.Loop := false;

end;

if ((DayOfWeek(Now) >= Monday) and (DayOfWeek(Now)

begin

PAL.WaitForTime(T['18:52:55']);

ActivePlayer.FadeToNext;

end;

Link to comment
Share on other sites

Jenni, I use this script, you can change the setting

Pal.Loop:=True;

   Pal.LockExecution;
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
var Dinsdag      : Boolean;
var Donderdag    : Boolean;
var DDays        : Boolean;
var Begintijd    : string = '20:00:00'; // Begintijd
var Eindtijd     : string = '22:59:59'; // Eindtijd
var QueueTimeUur : Integer = 3*(60*60*1200);  //1=1uur 2=2uur 3=3uur om X uur muziek te vullen 
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Enkele dag, De Dinsdag
Dinsdag := (DayOfWeek(Now) = Tuesday);
// Enkele dag, De Donderdag
Donderdag := (DayOfWeek(Now) = Thursday);
//Combine days 
//------------------------------------------------------------------------------
// All D-days, Dinsdag & Donderdag
DDays := (Dinsdag or Donderdag);
//------------------------------------------------------------------------------
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-


while (DDays) and ((Now >= T[begintijd]) and (Now  begin


Queue.Clear;


   While Queue.Duration   Begin

Cat['Nederlands'].QueueBottom(smLRP, EnforceRules);
Cat['Nederlands'].QueueBottom(smLRP, EnforceRules);
 end;


ActivePlayer.FadeTonext;

PAL.WaitForTime(T[Eindtijd]);
ActivePlayer.FadeTonext;


end;

// Keep this line always as last.
 Pal.UnLockExecution; 

Translation:

Dinsdag = tuesday

Donderdag = thursday

Begintijd = startingtime

Eindtijd = endtime

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...