jenni Posted August 10, 2011 Share Posted August 10, 2011 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 More sharing options...
shoutcaststreaming Posted August 10, 2011 Share Posted August 10, 2011 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 More sharing options...
jenni Posted August 12, 2011 Author Share Posted August 12, 2011 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 More sharing options...
EricVdM Posted August 12, 2011 Share Posted August 12, 2011 Jenni, I sended you an PM with another option in Dutch. Easier way is working with "Event Scheduler" like I wrote in my PM. Eric Link to comment Share on other sites More sharing options...
jenni Posted August 14, 2011 Author Share Posted August 14, 2011 Hi Eric I already tried that but that needs a trick which work But i love the idea that it should be automated Link to comment Share on other sites More sharing options...
jenni Posted August 14, 2011 Author Share Posted August 14, 2011 Just forget I'm close now for an solution Link to comment Share on other sites More sharing options...
EricVdM Posted August 14, 2011 Share Posted August 14, 2011 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 More sharing options...
jenni Posted August 16, 2011 Author Share Posted August 16, 2011 I will give it a try with yours Will keep u posted. Thanks J Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.