jenni Posted August 10, 2011 Share Posted August 10, 2011 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 More sharing options...
EricVdM Posted August 10, 2011 Share Posted August 10, 2011 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 More sharing options...
jenni Posted August 11, 2011 Author Share Posted August 11, 2011 Hi Eric Bedankt Als ik het goed heb draait deze script alleen op de Dinsdag en Donderdag tussen 20u en 23u? Hoe doe ik dat voor Maandag t/m vrijdag afspelen? Thanks J Link to comment Share on other sites More sharing options...
jenni Posted August 11, 2011 Author Share Posted August 11, 2011 Ps Eric Kan je het zodanig voor me aanpassen voor het afspelen tussen Maandag en Vrijdag en Queue moet niet leeg aub.. Na het nieuws moet ie verder met volgende track. Alvast Bedankt J Link to comment Share on other sites More sharing options...
jenni Posted August 11, 2011 Author Share Posted August 11, 2011 De reden waarom ik je vraag is dat ik deze beter kan lezen/begrijpen: while ((DayOfWeek(Now) >= Monday) and (DayOfWeek(Now) begin Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.