Jump to content

Script not working


jenni

Recommended Posts

Hi i tried a script to play only between monday and friday.

First it should play the news jingle then the news url

News is taken about 15 min

After the news fade to next track

But it keeps putting the jingle and news url on top in the que and start it to play over and over again

Any help please whats wrong with the script

 

Thanks

J

 

Pal.Loop:=True;

 

Pal.LockExecution;

 

PAL.WaitForTime(T['21:40:08']);

//Queue.Clear;

 

if not (DayOfWeek(Now) = Sunday) or (DayOfWeek(Now) = Saturday)

then begin

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

ActivePlayer.FadeTonext;

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

ActivePlayer.FadeTonext;

PAL.WaitForTime(T['21:45:01']);

ActivePlayer.FadeTonext;

end;

Pal.UnLockExecution;

Link to comment
Share on other sites

It keeps on playing over and over again, as you have your time test inside of your LOOP.

 

If the time you are searching has past, the code will fall through and execute the lines below it. Over and over and over again.

 

Change the logic.

 

Hi i tried a script to play only between monday and friday.

First it should play the news jingle then the news url

News is taken about 15 min

After the news fade to next track

But it keeps putting the jingle and news url on top in the que and start it to play over and over again

Any help please whats wrong with the script

 

Thanks

J

 

Pal.Loop:=True;

 

Pal.LockExecution;

 

PAL.WaitForTime(T['21:40:08']);

//Queue.Clear;

 

if not (DayOfWeek(Now) = Sunday) or (DayOfWeek(Now) = Saturday)

then begin

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

ActivePlayer.FadeTonext;

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

ActivePlayer.FadeTonext;

PAL.WaitForTime(T['21:45:01']);

ActivePlayer.FadeTonext;

end;

Pal.UnLockExecution;

SCS - Dedicated Bandwidth Servers

Shoutcast / Icecast / Windows Media

Transcoding - Auto DJ - Mobile Radio - FLASH Players - Auto DJ

Broadcasting World's Stream Host of the Month

Link to comment
Share on other sites

It keeps on playing over and over again, as you have your time test inside of your LOOP.

 

If the time you are searching has past, the code will fall through and execute the lines below it. Over and over and over again.

 

Change the logic.

 

Hi

 

Thanks for replying.

 

What do you mean with Change the logic.

I'm not a guru.

Maybe you can change the script for me so i can see what u mean.

 

Thanks in advance.

J

Link to comment
Share on other sites

Did you tried your script like this?

 

Pal.Loop:=True;

Pal.LockExecution;

PAL.WaitForTime(T['21:40:08']);

if not (DayOfWeek(Now) = Sunday) or (DayOfWeek(Now) = Saturday)

then begin

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

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

ActivePlayer.FadeTonext;

end;

Pal.UnLockExecution;

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...