Skip to Content
It is currently August 15th, 2022, 5:02 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: May 27th, 2012, 5:11 am 
Offline
New User
New User

Joined: October 18th, 2007, 1:27 am
Posts: 16
Location: Houston, TX USA
@robot-gobot:
This is what happened when I tested the script:
I get the desired pause on the active player. It also clears the queue. BUT it does the same thing regardless of whether the active player has 3 or 30minutes left to play.
However, I observed that for particular 30mins show that ends about the same time the news update starts, it fades out the active player at the right time with only a few seconds left, then it plays all three fines correctly. Leading me to think there may be a problem here:
Code:
If ((ActivePlayer.Duration)-(ActivePlayer.CurTime) > 60000) and FileExists('C:\news\News Update.mp3') then
.

That string is saying if active player has more than 10mins left to play, right?


Top
 Profile  
Reply with quote  
PostPosted: May 27th, 2012, 7:28 am 
Offline
New User
New User

Joined: December 12th, 2010, 3:31 am
Posts: 24
Location: Smolensk Province, Russia
tundeyoung wrote:
That string is saying if active player has more than 10mins left to play, right?


That`s right, except 60000 milliseconds = 1 minute, not 10(maybe here is your problem?). And as you can see from the script, queue should be cleared only if this is true. I tested script myself thoroughly and couldn`t reproduce your issue. Are you sure your testing method is valid? Did You change time of the show to yours?


Top
 Profile  
Reply with quote  
PostPosted: May 27th, 2012, 11:50 am 
Offline
New User
New User

Joined: October 18th, 2007, 1:27 am
Posts: 16
Location: Houston, TX USA
robot-gobot wrote:
tundeyoung wrote:
That string is saying if active player has more than 10mins left to play, right?


That`s right, except 60000 milliseconds = 1 minute, not 10(maybe here is your problem?). And as you can see from the script, queue should be cleared only if this is true. I tested script myself thoroughly and couldn`t reproduce your issue. Are you sure your testing method is valid? Did You change time of the show to yours?

Ignorant me! No, I didn't change the time. That obviously is the issue, I will change it to 600000. It should work fine then.


Top
 Profile  
Reply with quote  
PostPosted: May 27th, 2012, 8:48 pm 
Offline
New User
New User

Joined: October 18th, 2007, 1:27 am
Posts: 16
Location: Houston, TX USA
Oh yes! It work perfectly now.
I really appreciate your help, my dear friend. It's with the contributions of people like you that the web is the huge success it is today.
If you don't mind we can be friends on FB just plug in facebook dot com /tundeyoung. Hopefully, sometimes in future, I may have an opportunity to be nice to you in returns.

Do take care.


Top
 Profile  
Reply with quote  
PostPosted: July 2nd, 2022, 10:10 pm 
Offline
New User
New User

Joined: May 9th, 2016, 12:59 pm
Posts: 13
robot-gobot wrote:
Here is the new script:
Code:
PAL.Loop := True;
Pal.WaitforTime ('XX:36:55'); {## Wait for next hour}
PAL.LockExecution;
Queue.Clear;
CAT['Station Image'].QueueTOP(smLRP, NoRules);
Queue.AddFile('C:\news\newspromo.mp3',ipTop);
Queue.AddFile('C:\news\News Update.mp3',ipTop);
If ((ActivePlayer.Duration)-(ActivePlayer.CurTime) > 60000) and FileExists('C:\news\News Update.mp3') then
    Begin
        If DeckA.Status = psPlaying then
            Begin
                DeckB.QueueSong(Queue.NextInQueue);
                DeckA.FadeToPause;
                DeckB.Play;
            End
        Else
            Begin
                DeckA.QueueSong(Queue.NextInQueue);
                DeckB.FadeToPause;
                DeckA.Play;
            End;
       Queue.Clear;
    End
Else
   If FileExists('C:\news\News Update.mp3') then
    ActivePlayer.FadeToNext;
PAL.UnlockExecution;


Top
 Profile  
Reply with quote  
PostPosted: July 2nd, 2022, 10:21 pm 
Offline
New User
New User

Joined: May 9th, 2016, 12:59 pm
Posts: 13
robot-gobot wrote:
Here is the new script:
Code:
PAL.Loop := True;
Pal.WaitforTime ('XX:36:55'); {## Wait for next hour}
PAL.LockExecution;
Queue.Clear;
CAT['Station Image'].QueueTOP(smLRP, NoRules);
Queue.AddFile('C:\news\newspromo.mp3',ipTop);
Queue.AddFile('C:\news\News Update.mp3',ipTop);
If ((ActivePlayer.Duration)-(ActivePlayer.CurTime) > 60000) and FileExists('C:\news\News Update.mp3') then
    Begin
        If DeckA.Status = psPlaying then
            Begin
                DeckB.QueueSong(Queue.NextInQueue);
                DeckA.FadeToPause;
                DeckB.Play;
            End
        Else
            Begin
                DeckA.QueueSong(Queue.NextInQueue);
                DeckB.FadeToPause;
                DeckA.Play;
            End;
       Queue.Clear;
    End
Else
   If FileExists('C:\news\News Update.mp3') then
    ActivePlayer.FadeToNext;
PAL.UnlockExecution;


Top
 Profile  
Reply with quote  
PostPosted: July 2nd, 2022, 10:27 pm 
Offline
New User
New User

Joined: May 9th, 2016, 12:59 pm
Posts: 13
I modify this script to my needs it works but I need to add to play every 10 minutes, any ideas? I will appreciate
I did all kind of combinations with the time but I did not succeed, sorry I am not an full expert.
Thank you.
Here is the code:
Code:
PAL.Loop := True;
Pal.WaitforTime ('XX:00:55'); {## Wait for next }
PAL.LockExecution;
Queue.Clear;
Cat['Sin fin de lucro'].QueueTop(smRandom, NoRules);
If ((ActivePlayer.Duration)-(ActivePlayer.CurTime) > 120000)THEN
    Begin
        If DeckA.Status = psPlaying then
            Begin
                DeckB.QueueSong(Queue.NextInQueue);
                DeckA.FadeToPause;
                DeckB.Play;
            End
        Else
            Begin
                DeckA.QueueSong(Queue.NextInQueue);
                DeckB.FadeToPause;
                DeckA.Play;
                End;
       Queue.Clear;
    End


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group