script vraagje

Voor vragen over Playlist Automation Language.
Plaats reactie
poprockfm

script vraagje

Ongelezen bericht door poprockfm »

Hallo

Ik had een scriptje gekregen van Gerrit alleen blijken er nog errors in te zitten ik heb vermoedelijk iets te veel er ingezet , iemand die me op weg kan helpen?

Code: Selecteer alles

PAL.Loop:=True;

PAL.LockExecution;
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
var Dinsdag : Boolean;
var Donderdag : Boolean;
var DDays : Boolean;
var Begintijd : string = '9:58:45'; // Begintijd
var Eindtijd : string = '13:59:59'; // Eindtijd
var QueueTimeUur : Integer = 1*(60*60*1200); //1=1uur 2=2uur 3=3uur om X uur muziek te vullen
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Enkele dag, De Maandag
Maandag := (DayOfWeek(Now) = Monday);
// Enkele dag, De Disndag
Dinsdag := (DayOfWeek(Now) = Tuesday);
// Enkele dag, De Woensdag
Woensdag := (DayOfWeek(Now) = Wednesday);
// Enkele dag, De Donderdag
Donderdag := (DayOfWeek(Now) = Thursday);
// Enkele dag, De vrijdag)
Vrijdag := (DayOfWeek(Now) = Friday);
// Enkele dag, De Zaterdag
Saturday := (DayOfWeek(Now) = Zaterdag);
// Enkele dag, De Zondag
Zondag := (DayOfWeek(Now) = Sunday);

//Hieronder kan je dagen combineren
//------------------------------------------------------------------------------
// Alle D-dagen, Maaandag & Dinsdag & Woensdag & Donderdag & Vrijdag & Zaterdag & zondag
DDays := (Maandag or Dinsdag or Woensdag or Donderdag or Vrijdag or Zaterdag or Zondag);
//------------------------------------------------------------------------------
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

while (DDays) and ((Now >= T[Begintijd]) and (Now <= T[Eindtijd])) do
begin

Queue.Clear;

While Queue.Duration < QueueTimeUur do
Begin
Queue.AddFile('E:\Muziekmap\Jingle map\Jingles\Reclame\commercials december.mp3',ipTop);
ActivePlayer.FadeToNext;
Queue.AddFile('E:\Muziekmap\Jingle map\Jingles\Jingles uuraankeiler\uuraankeiler.mp3',ipBottom);
Queue.AddFile('E:\Novum nieuws\Novum nieuws hele uren\Novumnieuws.mp3',ipBottom);
Queue.AddFile('E:\Muziekmap\Jingle map\Jingles\Jingles - uuropener\Pop Rock FM uuropener.mp3',ipBottom);
var QueueTime : Integer =1*(60*60*1200);
While Queue.Duration < QueueTime do
Begin

Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['Jingles gezongen'].QueueBottom(smLRP, EnforceRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['Jingles liners'].QueueBottom(smLRP, NoRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['Jingles kerst'].QueueBottom(smLRP, EnforceRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['Jingles kerst'].QueueBottom(smLRP, NoRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['Jingles uuropener'].QueueBottom(smLRP, EnforceRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['Jingles liners'].QueueBottom(smLRP, NoRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['Jingles gezongen'].QueueBottom(smLRP, EnforceRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);
Cat['Jingles kerst'].QueueBottom(smLRP, NoRules);
Cat['80'].QueueBottom(smLRP, EnforceRules);

end;

ActivePlayer.FadeTonext;

PAL.WaitForTime(T[Eindtijd]);
ActivePlayer.FadeTonext;

end;
Than ks

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

Re: script vraagje

Ongelezen bericht door Wout »

Code: Selecteer alles

PAL.Loop:=True;

    PAL.LockExecution;
        //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        var Maandag, Dinsdag, Woensdag, Donderdag, Vrijdag, Zaterdag, Zondag, DDays : Boolean;

        var Begintijd : string = '9:58:45'; // Begintijd
        var Eindtijd : string = '13:59:59'; // Eindtijd
        var QueueTimeUur : Integer = 1*(60*60*1200); //1=1uur 2=2uur 3=3uur om X uur muziek te vullen
        //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        // Enkele dag, De Maandag
        Maandag := (DayOfWeek(Now) = Monday);
        // Enkele dag, De Disndag
        Dinsdag := (DayOfWeek(Now) = Tuesday);
        // Enkele dag, De Woensdag
        Woensdag := (DayOfWeek(Now) = Wednesday);
        // Enkele dag, De Donderdag
        Donderdag := (DayOfWeek(Now) = Thursday);
        // Enkele dag, De vrijdag)
        Vrijdag := (DayOfWeek(Now) = Friday);
        // Enkele dag, De Zaterdag
        Zaterdag := (DayOfWeek(Now) = Saturday);
        // Enkele dag, De Zondag
        Zondag := (DayOfWeek(Now) = Sunday);

        //Hieronder kan je dagen combineren
        //------------------------------------------------------------------------------
        // Alle D-dagen, Maaandag & Dinsdag & Woensdag & Donderdag & Vrijdag & Zaterdag & zondag
        DDays := (Maandag or Dinsdag or Woensdag or Donderdag or Vrijdag or Zaterdag or Zondag);
        //------------------------------------------------------------------------------
        //+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
    PAL.UnLockExecution;

    while (DDays) and ((Now >= T[Begintijd]) and (Now <= T[Eindtijd])) do
        begin
    
            Queue.Clear;

            Queue.AddFile('E:\Muziekmap\Jingle map\Jingles\Reclame\commercials december.mp3',ipTop);
            ActivePlayer.FadeToNext;
            Queue.AddFile('E:\Muziekmap\Jingle map\Jingles\Jingles uuraankeiler\uuraankeiler.mp3',ipBottom);
            Queue.AddFile('E:\Novum nieuws\Novum nieuws hele uren\Novumnieuws.mp3',ipBottom);
            Queue.AddFile('E:\Muziekmap\Jingle map\Jingles\Jingles - uuropener\Pop Rock FM uuropener.mp3',ipBottom);

            While Queue.Duration < QueueTimeUur do
                Begin

                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles gezongen'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles liners'].QueueBottom(smLRP, NoRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles kerst'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles kerst'].QueueBottom(smLRP, NoRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles uuropener'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles liners'].QueueBottom(smLRP, NoRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles gezongen'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles kerst'].QueueBottom(smLRP, NoRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);

                end;

            ActivePlayer.FadeTonext;

            PAL.WaitForTime(T[Eindtijd]);
            ActivePlayer.FadeTonext;

        end; 
Afbeelding
poprockfm

Re: script vraagje

Ongelezen bericht door poprockfm »

Top man

Dank je wel het werkt nu wel zonder problemen..... We gaan het zien morgenochtend om 1000 uur ik ben benieuwd of ie hem wil starten nu....

Thanks

Goos
poprockfm

Re: script vraagje

Ongelezen bericht door poprockfm »

He WOut

Ik zie alleen nu dat ie op running blijft hangen beetje vaag

PAL.Loop:=True;

PAL.UnLockExecution;
Geen idee waarom eerlijk gezegd

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

Re: script vraagje

Ongelezen bericht door Wout »

Nee, hij hangt niet.
Hij mag niet beginnen dus loopt ie z`n programma steeds maar van voor af aan totdat hij de verstreken tijd krijgt.

Maar als het voor alle dagen hetzelfde is, kan je de helft van je PAL al weglaten.

Code: Selecteer alles

PAL.Loop:=True;

    while ((Now >= T['09:58:45']) and (Now <= T['13:59:59'])) do
        begin
            Queue.Clear;
            Queue.AddFile('E:\Muziekmap\Jingle map\Jingles\Reclame\commercials december.mp3',ipTop);
            ActivePlayer.FadeToNext;
            Queue.AddFile('E:\Muziekmap\Jingle map\Jingles\Jingles uuraankeiler\uuraankeiler.mp3',ipBottom);
            Queue.AddFile('E:\Novum nieuws\Novum nieuws hele uren\Novumnieuws.mp3',ipBottom);
            Queue.AddFile('E:\Muziekmap\Jingle map\Jingles\Jingles - uuropener\Pop Rock FM uuropener.mp3',ipBottom);
            While Queue.Duration < (60*60*1200) do
                Begin
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles gezongen'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles liners'].QueueBottom(smLRP, NoRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles kerst'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles kerst'].QueueBottom(smLRP, NoRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles uuropener'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles liners'].QueueBottom(smLRP, NoRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles gezongen'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                    Cat['Jingles kerst'].QueueBottom(smLRP, NoRules);
                    Cat['80'].QueueBottom(smLRP, EnforceRules);
                end;
            ActivePlayer.FadeTonext;
            PAL.WaitForTime(T['13:59:59']);
            ActivePlayer.FadeTonext;
        end; 
Afbeelding
poprockfm

Re: script vraagje

Ongelezen bericht door poprockfm »

Klopt is ook elke dag tussen 10-4 uur muziek uit de jaren 80. Ik neem aan dat ie dan gewoon op running blijft hangen maar hij gaat hem wel starten neem ik dus aan ...

Goos :wink:
Plaats reactie
  • Vergelijkbare Onderwerpen
    Reacties
    Weergaves
    Laatste bericht