frankallen Posted November 28, 2015 Share Posted November 28, 2015 Hey guys I'm extremely new to Pal scripts. This one seems to keep restarting its self any ideas where i'm going wrong with it ? It starts and plays fine but i notice the pal script keep waiting on a time and them restarting. Any help would be Greatly Received. Thanks start_time := date + EncodeTime(15,15,30,0);[/font] [font=arial]end_time := date + EncodeTime(16,15,30,0);[/font] [font=arial] [/font] [font=arial] if DayOfWeek(Now) = Saturday then[/font] [font=arial] begin[/font] [font=arial] [/font] [font=arial] if( mytime >= start_time) and (mytime [font=arial] begin[/font] [font=arial] WriteLn('Canvas Prog Hour!');[/font] [font=arial] [/font] [font=arial] Queue.AddFile('C:\Users\a\Music\skiffle\Mix - Delta Blues - 2 hours of Blues, 41 great tracks, the greatest stars of the Delta\Chicago Blues, Live Vol. 1.mp3',ipTop);[/font] [font=arial] [/font] [font=arial] PAL.WaitForTime(T['+00:01:00']);[/font] [font=arial] ActivePlayer.FadeToNext;[/font] [font=arial] [/font] [font=arial] [/font] [font=arial] end;[/font] [font=arial] end; http://i.imgur.com/qrEUBH7.png Check us out http://www.itsjustradio.org Link to comment Share on other sites More sharing options...
shoutcaststreaming Posted November 28, 2015 Share Posted November 28, 2015 This can't be the whole script, as what you posted won't even compile. You are missing the VAR statements for start_time & end_time and some others. What are you trying to do ? 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...
frankallen Posted November 28, 2015 Author Share Posted November 28, 2015 This can't be the whole script, as what you posted won't even compile. You are missing the VAR statements for start_time & end_time and some others. What are you trying to do ? It's a start show script. It all seems to work I.e it selects the file I want played at the time I input. But it keeps restarting the file. I want to schedule pre recorded shows . http://i.imgur.com/qrEUBH7.png Check us out http://www.itsjustradio.org Link to comment Share on other sites More sharing options...
shoutcaststreaming Posted November 28, 2015 Share Posted November 28, 2015 Use the Event Scheduler, it's easier. 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...
lazydog Posted November 29, 2015 Share Posted November 29, 2015 Been there ;) run Airtime on a dedicated server makes life so easy.12.4 Ubuntu and use http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/what-is-airtime/ use this set up in conjuction with a centova based auto dj as Airtime has not got this part defined yet, but for normal scheduling and dragging in live feeds easy as ;) Link to comment Share on other sites More sharing options...
frankallen Posted November 29, 2015 Author Share Posted November 29, 2015 Your quite right I don't know how i missed that, PAL.Loop := True; var mytime : DateTime = now; var I : Integer; var start_time, end_time : DateTime; start_time := date + EncodeTime(07,59,30,0); end_time := date + EncodeTime(08,59,30,0); if DayOfWeek(Now) = Saturday then begin if( mytime >= start_time) and (mytime begin WriteLn('Canvas Prog Hour!'); Queue.AddFile('C:Users\a\Desktop\BTG\BTG2015104.mp3',ipTop); PAL.WaitForTime(T['+00:01:00']); ActivePlayer.FadeToNext; end; end; Either way with the Variable it still repeats. I don't want to use event scheduler as it only add to the queue This is not what i want. I don't want a dedicated server either. Thanks for your help I think i will head on over to spacial and figure it out. http://i.imgur.com/qrEUBH7.png Check us out http://www.itsjustradio.org Link to comment Share on other sites More sharing options...
frankallen Posted November 29, 2015 Author Share Posted November 29, 2015 (edited) Your quite right I don't know how i missed that, PAL.Loop := True; var mytime : DateTime = now; var I : Integer; var start_time, end_time : DateTime; start_time := date + EncodeTime(07,59,30,0); end_time := date + EncodeTime(08,59,30,0); if DayOfWeek(Now) = Saturday then begin if( mytime >= start_time) and (mytime begin WriteLn('Canvas Prog Hour!'); Queue.AddFile('C:Users\a\Desktop\BTG\BTG2015104.mp3',ipTop); PAL.WaitForTime(T['+00:01:00']); ActivePlayer.FadeToNext; end; end; Either way with the Variable it still repeats. I don't want to use event scheduler as it only add to the queue This is not what i want. I don't want a dedicated server either. Thanks for your help I think i will head on over to spacial and figure it out. ARHH HAAA I see now . start_time := date + EncodeTime(07,59,00,0); end_time := date + EncodeTime(07,59,30,0); if DayOfWeek(Now) = Saturday then begin I Think lol Trial and error always works best Edited November 29, 2015 by frankallen http://i.imgur.com/qrEUBH7.png Check us out http://www.itsjustradio.org Link to comment Share on other sites More sharing options...
SmoothJazz Posted November 29, 2015 Share Posted November 29, 2015 I see you asked the same question on the spacial forums as well. An answer is there also. http://5280jazz.com/nowplaying_image/5280jazz.png Rob Oyler 5280 Jazz Link to comment Share on other sites More sharing options...
frankallen Posted November 29, 2015 Author Share Posted November 29, 2015 Yes Thank you I appreciate the help I have Finally got it working Phewww I have had a few head banging keyboard moments. http://i.imgur.com/qrEUBH7.png Check us out http://www.itsjustradio.org Link to comment Share on other sites More sharing options...
shoutcaststreaming Posted November 29, 2015 Share Posted November 29, 2015 You are using PAL.Loop which keeps the script rolling. After the song is queued and played you must wait (at least 1 day) before the script re-cycles. You can add this line: PAL.WaitForTime('+23:59:59');which will call it to wait for 1 day. Here is the modified script:PAL.Loop := True; var mytime : DateTime = now; var I : Integer; var start_time, end_time : DateTime; start_time := date + EncodeTime(07,59,30,0); end_time := date + EncodeTime(08,59,30,0); if DayOfWeek(Now) = Saturday then begin if( mytime >= start_time) and (mytime begin WriteLn('Canvas Prog Hour!'); Queue.AddFile('C:Users\a\Desktop\BTG\BTG2015104.mp 3',ipTop); PAL.WaitForTime(T['+00:01:00']); ActivePlayer.FadeToNext; end; end; PAL.WaitForTime('+23:59:59'); 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...
frankallen Posted November 29, 2015 Author Share Posted November 29, 2015 Thanks very much I have Added this and now it is waiting for time I assume this is to regenerate the script ? Do i need to do this if it is set for weekly ? Sorry I'm struggling to Understand it at the moment as I'm only 3 days in to learning it. http://i.imgur.com/qrEUBH7.png Check us out http://www.itsjustradio.org Link to comment Share on other sites More sharing options...
shoutcaststreaming Posted November 30, 2015 Share Posted November 30, 2015 Well we first have to establish what you are trying to accomplish. I assumed that you want to run that show on a Saturday and then wait for the next Saturday to run it again. That is what I have done to the script. If this isn't what you are trying to do, let me know. 1 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...
GKIye Posted November 30, 2015 Share Posted November 30, 2015 I agree with SCS ... Use Event Sheduler if You wonna start a show at a specific day and time example : - load file = select file and load and notice to write ipTop - enter = every Saturday (or other day) - enter = hour / time ... If You have a TOTH who starts e.g. at xx:59:45 ... than start the release of the file / show at xx:00:05 so ... TOTH e.g. 11:59:45 ... file / show at 12:00:05 etc ... That way the set gonna be played right after the TOTH in the ipTop of the queue list - click OK Its about the best way to shedule shows, promos or anything else at a specific time / day and / or You can shedule also specific music at days / time ... one hour of specials etc ... Good luck ! PS : For reason that I'm using Event Sheduler for everything I run only 2 PAL ... one for the TOTH and one to connect with TuneIn Visit and listen @ BW ! Link to comment Share on other sites More sharing options...
frankallen Posted November 30, 2015 Author Share Posted November 30, 2015 Well we first have to establish what you are trying to accomplish. I assumed that you want to run that show on a Saturday and then wait for the next Saturday to run it again. That is what I have done to the script. If this isn't what you are trying to do, let me know. Thank you So much. What I am trying to accomplish is to have My pre- recorded sets of which I have 9 of to play at set times on set days repeating weekly. Then all i need do is update the File location link within the script as I receive the new file. I had no idea that PAL scripts needed to be recycled. I am now a little wiser http://i.imgur.com/qrEUBH7.png Check us out http://www.itsjustradio.org Link to comment Share on other sites More sharing options...
frankallen Posted November 30, 2015 Author Share Posted November 30, 2015 I agree with SCS ... Use Event Sheduler if You wonna start a show at a specific day and time example : - load file = select file and load and notice to write ipTop - enter = every Saturday (or other day) - enter = hour / time ... If You have a TOTH who starts e.g. at xx:59:45 ... than start the release of the file / show at xx:00:05 so ... TOTH e.g. 11:59:45 ... file / show at 12:00:05 etc ... That way the set gonna be played right after the TOTH in the ipTop of the queue list - click OK Its about the best way to shedule shows, promos or anything else at a specific time / day and / or You can shedule also specific music at days / time ... one hour of specials etc ... Good luck ! PS : For reason that I'm using Event Sheduler for everything I run only 2 PAL ... one for the TOTH and one to connect with TuneIn Hey GK The Only reason i don't use event scheduler is because it adds the file to the bottom of the queue. As i hold a minimum of 10 songs in the queue this would mean the track i add would not play at set time, it would have to wait until it hit the top of the queue. Pal Script adds the file to the top of the queues. Admittedly Its more work and a learning curve. But i think it will be worth it. Thanks for your input though Regards Frank http://i.imgur.com/qrEUBH7.png Check us out http://www.itsjustradio.org Link to comment Share on other sites More sharing options...
shoutcaststreaming Posted November 30, 2015 Share Posted November 30, 2015 (edited) Hey GK The Only reason i don't use event scheduler is because it adds the file to the bottom of the queue. As i hold a minimum of 10 songs in the queue this would mean the track i add would not play at set time' date=' it would have to wait until it hit the top of the queue. Pal Script adds the file to the top of the queues. Admittedly Its more work and a learning curve. But i think it will be worth it.[/quote']Yes, but you can change it to make it go to the top of the Queue. Here is a show that I have set up with the ES. It defaults to the bottom of the queue: http://prntscr.com/98lxti All I have to do is manually change ipBottom to ipTop and when the ES goes to play the show, it will put it at the TOP of the queue: http://prntscr.com/98lyh2 And if you want the Queue to play it IMMEDIATELY, just add this line:ActivePlayer.FadeToNext; Here is an example: http://prntscr.com/98lzyd Edited November 30, 2015 by shoutcaststreaming 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...
frankallen Posted November 30, 2015 Author Share Posted November 30, 2015 Oh I See Thank you so much I really appreciate your help I will make notes of this and try them out in future. At least now I have the best of both worlds. http://i.imgur.com/qrEUBH7.png Check us out http://www.itsjustradio.org Link to comment Share on other sites More sharing options...
GKIye Posted December 1, 2015 Share Posted December 1, 2015 (edited) Hi Frank, In fact its piece of cake ... After loading the file into the window of eventsheduler it gonna create a "command line" Basicly that is set to "ipBottom" But You can change that - check the post made by SCS - by deleting Bottom from ipBottom and write Top ... so it gonna show "ipTop" Now Your file gonna load at the specific time into the TOP of the queue list Oh I See Thank you so much I really appreciate your help I will make notes of this and try them out in future. At least now I have the best of both worlds. Once again ... - write Your TOTH as following function ActivePlayer:TPlayer; forward; {Wait for right time} PAL.Loop := true; PAL.WaitForTime(T['xx:59:43']); {Clear queue} Queue.Clear; Cat ['News (ALL)'].QueueTop(smLemmingLogic,NoRules); ActivePlayer.FadeToNext; function ActivePlayer:TPlayer; begin if DeckA.Status = psPlaying then Result := DeckA else Result := DeckB; end; - the result of your Event Sheduler gonna look (more or less) as : Queue.AddFile('E:\......Radio Sets\.... ....\....... .... - ...... Pt1.mp3',ipTop); - BUT You can add in front of it also an ad, promo, ID etc Queue.AddFile('E:\......Radio Sets\.... ....\....... .... - ...... Pt1.mp3',ipTop); Cat['IDS Overlay'].QueueTop(smLRP, NoRules); The event sheduler script works from the "bottom" to the "top" So what is written at the bottom gonna play in front of what is written above etc etc PS : sorry for the emotions who appear into the command lines If You wonna hear the result of it ... check my stream at the TOTH Edited December 1, 2015 by GKIye typo Visit and listen @ BW ! Link to comment Share on other sites More sharing options...
countrywesterndj Posted December 1, 2015 Share Posted December 1, 2015 The event sheduler script works from the "bottom" to the "top" So what is written at the bottom gonna play in front of what is written above etc etcThat is absolutely NOT true. The event scheduler (ES) executes the commands from top to bottom, in the order they were entered. So in the example of Shoutcaststreaming (http://prntscr.com/98lzyd) ... Queue.AddFile('C:\radio\texas_countdown\112515\texas countdown - 112515_mixdown.mp3',ipBottom); ActivePlayer.FadeToNext;It would execute line #1 FIRST: Queue.AddFile('C:\radio\texas_countdown\112515\texas countdown - 112515_mixdown.mp3',ipBottom); Then it would execute line #2 SECOND: ActivePlayer.FadeToNext; You're making this more complicated that need be. Spacial SVS Support Team http://support.spacialaudio.com/forums/ Get help with PAL Scripts at http://www.palscripts.com Link to comment Share on other sites More sharing options...
GKIye Posted December 1, 2015 Share Posted December 1, 2015 (edited) Strange ... It works for Me Please notice that You are writing the command as ipBottom I write them as ipTop You are right if the command runs as ipBottom As ipTop it runs in the reverse way So apologise Me ... But its not Me who makes it more complicated !! That is absolutely NOT true. The event scheduler (ES) executes the commands from top to bottom, in the order they were entered. You're making this more complicated that need be. If You are not sure about my input ... please check my stream Edited December 1, 2015 by GKIye Visit and listen @ BW ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now