Jinglescript niet op bepaalde tijd

Voor vragen over Playlist Automation Language.
Radio Delta

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door Radio Delta »

Het script is wel traag dus wil dat wel weten om het zo goed mogelijk te hebben.
drOhimself

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door drOhimself »

Begin bovenaan:

Code: Selecteer alles

    PAL.Loop := True;
	PAL.LockExecution;
Pas hele script aan zoals hieronder aangegeven :

Code: Selecteer alles

  	
    while ((Now >= T['00:05:00']) and (Now <= T['00:55:00'])) do
    Begin
	PAL.UnLockExecution;
    CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
    PAL.WaitForPlayCount(3);
	PAL.LockExecution;
    End;
En zet helemaal onderaan nog een keer :

Code: Selecteer alles

PAL.UnLockExecution;
Radio Delta

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door Radio Delta »

Ik ga het aanpassen. Bedankt voor de uitleg.
Radio Delta

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door Radio Delta »

Hierbij het nieuwe script.

Code: Selecteer alles

PAL.Loop := True;
PAL.LockExecution;

while ((Now >= T['00:05:00']) and (Now <= T['00:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['01:05:00']) and (Now <= T['01:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['02:05:00']) and (Now <= T['02:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['03:05:00']) and (Now <= T['03:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['04:05:00']) and (Now <= T['04:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['05:05:00']) and (Now <= T['05:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['06:05:00']) and (Now <= T['06:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['07:05:00']) and (Now <= T['07:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['08:05:00']) and (Now <= T['08:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['09:05:00']) and (Now <= T['09:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['10:05:00']) and (Now <= T['10:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['11:05:00']) and (Now <= T['11:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['12:05:00']) and (Now <= T['12:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['13:05:00']) and (Now <= T['13:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['14:05:00']) and (Now <= T['14:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['15:05:00']) and (Now <= T['15:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['16:05:00']) and (Now <= T['16:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['17:05:00']) and (Now <= T['17:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['18:05:00']) and (Now <= T['18:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['19:05:00']) and (Now <= T['19:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['20:05:00']) and (Now <= T['20:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['21:05:00']) and (Now <= T['21:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['22:05:00']) and (Now <= T['22:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['23:05:00']) and (Now <= T['23:55:00'])) do
Begin
PAL.LockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

PAL.LockExecution;
drOhimself

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door drOhimself »

Nee... dat gaat um niet worden zo....!

Let even goed op mijn berichtje van gisteren 19:37
(ik doe het even buiten de Code, want anders zie je niet de BOLD en underline

Boven aan : PAL.LockExecution

Dan in de 'uur'-segmenten :

while ((Now >= T['00:05:00']) and (Now <= T['00:55:00'])) do
Begin
PAL.UNLOCKExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LOCKExecution;
End;

En helemaal onderaan :

PAL.UNLOCKExecution;

Dus niet overal 'PAL.lockExecution'.... dat gaat niet werken...
Het 'Locken' betekend dat SAM het zeg maar niet regel voor regel gaat doen, maar in een miliseconde ofzo.
Na het locken, kan je niet weer opnieuw locken, alleen maar UNlocken.

Savvy?
Radio Delta

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door Radio Delta »

Daarom is SAM nu gecrashed.

Ik ga het aanpassen
drOhimself

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door drOhimself »

Radio Delta schreef:Daarom is SAM nu gecrashed.
Dat gaat SAM helemaal niet fijn vinden, als ie zo'n PALletje voor zijn kiezen krijgt.... :-D
Radio Delta

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door Radio Delta »

Hierbij het aangepaste script.

Code: Selecteer alles

PAL.Loop := True;
PAL.LockExecution;

while ((Now >= T['00:05:00']) and (Now <= T['00:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['01:05:00']) and (Now <= T['01:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['02:05:00']) and (Now <= T['02:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['03:05:00']) and (Now <= T['03:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['04:05:00']) and (Now <= T['04:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['05:05:00']) and (Now <= T['05:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['06:05:00']) and (Now <= T['06:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['07:05:00']) and (Now <= T['07:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['08:05:00']) and (Now <= T['08:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['09:05:00']) and (Now <= T['09:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['10:05:00']) and (Now <= T['10:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['11:05:00']) and (Now <= T['11:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['12:05:00']) and (Now <= T['12:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['13:05:00']) and (Now <= T['13:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['14:05:00']) and (Now <= T['14:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['15:05:00']) and (Now <= T['15:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['16:05:00']) and (Now <= T['16:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['17:05:00']) and (Now <= T['17:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['18:05:00']) and (Now <= T['18:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['19:05:00']) and (Now <= T['19:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['20:05:00']) and (Now <= T['20:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['21:05:00']) and (Now <= T['21:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['22:05:00']) and (Now <= T['22:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

while ((Now >= T['23:05:00']) and (Now <= T['23:55:00'])) do
Begin
PAL.UnLockExecution;
CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
PAL.WaitForPlayCount(3);
PAL.LockExecution;
End;

PAL.UnLockExecution;
drOhimself

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door drOhimself »

Zo zou ie het moeten doen !
Radio Delta

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door Radio Delta »

Ik heb het script nu aangepast. SAM liep steeds vast om 5 minuten voor het uur tot 5 minuten na het uur.

Ik laat het weten als het werkt.
Radio Delta

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door Radio Delta »

Het script werkt nu goed. Bedankt voor de uitleg
drOhimself

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door drOhimself »

Mooi !

OPGELOST
Gebruikersavatar
Wout
Beheerder
Berichten: 3501
Lid geworden op: 03 dec 2007, 14:17
SAM-versie: 2019.3
Database: MariaDB
Windows: 11
Locatie: West-Brabant
Contacteer:

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door Wout »

Hoewel de bovenstaande oplossing ook zeker werkt.

Bemoei ik me toch een beetje ermee. ;)
Omdat hij vaak hetzelfde moet doen kan je het ook verkort maken.

Code: Selecteer alles

PAL.Loop := True ;

    var uur : String ;

    uur := FormatDateTime('hh', Now) ;

    if (Now >= T[uur+':05:00']) and (Now <= T[uur+':55:00']) then
        begin
            CAT['Jingles (All)'].QueueBottom(smLemmingLogic, NoRules);
        end
    else
        begin
             WriteLn('Geen Jingle') ;
        end ;
        
    PAL.WaitForPlayCount(3) ;
// Wout Franken, Broadcasterforum.nl, 09-juni-2011      
Er is niks mis mee met je code alleen is dit wat korter.
Afbeelding
drOhimself

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door drOhimself »

Wout,
Bedankt voor je hele korte script.
Hier liep ik al naar te zoeken.... maar kon hem niet vinden...
Hier zal Radio Delta helemaal blij mee zijn !
Radio Delta

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door Radio Delta »

Ik kon ook geen ander script vinden. Ga het nieuwe script testen.

Bedankt voor de reacties.
Radio Delta

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door Radio Delta »

Ik heb het nieuwe script getest en werkt perfect.

Bedankt voor de reacties.
Gebruikersavatar
Wout
Beheerder
Berichten: 3501
Lid geworden op: 03 dec 2007, 14:17
SAM-versie: 2019.3
Database: MariaDB
Windows: 11
Locatie: West-Brabant
Contacteer:

Re: Jinglescript niet op bepaalde tijd

Ongelezen bericht door Wout »

Mooi zo, dan sluiten we de topic.
Afbeelding
Gesloten
  • Vergelijkbare Onderwerpen
    Reacties
    Weergaves
    Laatste bericht