Gezocht start/stop script

Voor vragen over Playlist Automation Language.
Plaats reactie
Dirk65
Beginnende SAM-gebruiker
Berichten: 9
Lid geworden op: 20 jan 2017, 12:52
SAM-versie: SAM 2015.4
Database: MySQL 5.5
Windows: Windows 10

Gezocht start/stop script

Ongelezen bericht door Dirk65 » 29 jan 2017, 11:48

Beste Leden

Ik ben op zoek naar een start/stop script.
Die op een bepaalde tijd bijvoorbeeld om 05:59:00 en weer aan gaat om 23:00:00 uur.
Bestaat er zoiets en het gaat om 2 encoders 1 is voor vaste stream en de andere voor mobiele streaming.
En is bedoeld voor v2 streaming.
Heb er ooit 1 gehad maar die werkt niet meer naar behoren.
Ik hoop dat mijn vraag duidelijk genoeg is.

Vriendelijke Groeten Dirk65

Gebruikersavatar
drOhimself
Moderator
Berichten: 2941
Lid geworden op: 27 mar 2010, 11:44
SAM-versie: SAM 2014.7
Database: MySQL 5.0
Windows: 2000

Re: Gezocht start/stop script

Ongelezen bericht door drOhimself » 29 jan 2017, 16:02

Dirk65 schreef: Heb er ooit 1 gehad maar die werkt niet meer naar behoren.
Misschien dat we die aan kunnen passen ?
Post hem hier even.
Wat moet het script precies 'aan / uit' zetten ?
Groedjez,
drO

Dirk65
Beginnende SAM-gebruiker
Berichten: 9
Lid geworden op: 20 jan 2017, 12:52
SAM-versie: SAM 2015.4
Database: MySQL 5.5
Windows: Windows 10

Re: Gezocht start/stop script

Ongelezen bericht door Dirk65 » 29 jan 2017, 16:17

Beste Drohimself

Als het mogelijk is fan de decks en encoders uitzet.
Dat is eigenlijk de bedoeling.
Had eerst altijd de pal voor ieder uur.
Maar nu is het alleen maar voor de tijd die ik nu graag wil.

Vriendelijke Groeten Dirk65

Code: Selecteer alles

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['5:59:00']) and (Now <= T['5:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['5:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;

while (Now >= T['23:00:01']) and (Now <= T['23:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['23:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution;
//
while (Now >= T['23:59:00']) and (Now <= T['23:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['23:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Dirk65
Beginnende SAM-gebruiker
Berichten: 9
Lid geworden op: 20 jan 2017, 12:52
SAM-versie: SAM 2015.4
Database: MySQL 5.5
Windows: Windows 10

Re: Gezocht start/stop script

Ongelezen bericht door Dirk65 » 29 jan 2017, 18:24

Soory Drohimself.
Zie dat ik een tijd van 23:59:55 uitval ook heb staan.
Dat was niet de bedoeling stuur ff andere hopelijk kun je dit aanpassen als ik iets fout heb.

Code: Selecteer alles

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['5:59:00']) and (Now <= T['5:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['5:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;

while (Now >= T['23:00:01']) and (Now <= T['23:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['23:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution;

Gebruikersavatar
drOhimself
Moderator
Berichten: 2941
Lid geworden op: 27 mar 2010, 11:44
SAM-versie: SAM 2014.7
Database: MySQL 5.0
Windows: 2000

Re: Gezocht start/stop script

Ongelezen bericht door drOhimself » 14 feb 2017, 20:18

Zo te zien is je laatste script goed.
Wat zie je in de scriptpagina dan dat er fout gaat om 23:00:10 ?
Vertel ook even hoeveel encoders er nu werken in SAM, en geef even aan of die allemaal SHoutcast v2 zijn en zo niet, wat dan wel.

Indien je nu alleen maar v2 encoders hebt, plaats er dan ook nog een v1 encoder bij en laat script opnieuw lopen.
Gaat dan alleen de v1 encoder uit ?
Groedjez,
drO

Dirk65
Beginnende SAM-gebruiker
Berichten: 9
Lid geworden op: 20 jan 2017, 12:52
SAM-versie: SAM 2015.4
Database: MySQL 5.5
Windows: Windows 10

Re: Gezocht start/stop script

Ongelezen bericht door Dirk65 » 23 feb 2017, 11:56

Beste Dro

Sorry voor me late reactie.
Maar het gaat alleen nog maar om V2 versie.
V1 gebruik ik niet meer en mobiel is al andere oplossing voor gemaakt.
Het gaat nu nog maar om 1 stream voor V2 die uit moet vallen op bepaalde tijden.
Ik had ook ooit van hier een andere script die ieder uur uit zal vallen.
Alleen heb ik daar probleem mee dat die de tijd van 00:00:08 niet pakt.
Ik zal deze ook nog ff mee sturen of er daar een fout in zit wat ik over het hoofd zie.

Code: Selecteer alles

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['23:59:00']) and (Now <= T['23:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['23:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['0:00:01']) and (Now <= T['0:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['0:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution;

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['0:59:00']) and (Now <= T['0:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['0:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['1:00:01']) and (Now <= T['1:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['1:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['1:59:00']) and (Now <= T['1:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['1:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['2:00:01']) and (Now <= T['2:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['2:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution;
 
Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['2:59:00']) and (Now <= T['2:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['2:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['3:00:01']) and (Now <= T['3:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['3:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution;
 
Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['3:59:00']) and (Now <= T['3:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['2:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['4:00:01']) and (Now <= T['4:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['4:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution;
 
Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['4:59:00']) and (Now <= T['4:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['4:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['5:00:01']) and (Now <= T['5:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['5:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution;
 
Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['5:59:00']) and (Now <= T['5:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['5:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['6:00:01']) and (Now <= T['6:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['6:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['6:59:00']) and (Now <= T['6:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['6:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['7:00:01']) and (Now <= T['7:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['7:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['7:59:00']) and (Now <= T['7:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['7:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['8:00:01']) and (Now <= T['8:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['8:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['8:59:00']) and (Now <= T['8:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['8:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['9:00:01']) and (Now <= T['9:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['9:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['9:59:00']) and (Now <= T['9:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['9:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['10:00:01']) and (Now <= T['10:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['10:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['10:59:00']) and (Now <= T['10:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['10:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['11:00:01']) and (Now <= T['11:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['11:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['11:59:00']) and (Now <= T['11:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['11:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['12:00:01']) and (Now <= T['12:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['12:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['12:59:00']) and (Now <= T['12:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['12:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['13:00:01']) and (Now <= T['13:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['13:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['13:59:00']) and (Now <= T['13:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['13:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['14:00:01']) and (Now <= T['14:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['14:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['14:59:00']) and (Now <= T['14:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['14:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['15:00:01']) and (Now <= T['15:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['15:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['15:59:00']) and (Now <= T['15:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['15:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['16:00:01']) and (Now <= T['16:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['16:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['16:59:00']) and (Now <= T['16:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['16:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['17:00:01']) and (Now <= T['17:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['17:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['17:59:00']) and (Now <= T['17:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['17:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['18:00:01']) and (Now <= T['18:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['18:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['18:59:00']) and (Now <= T['18:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['18:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['19:00:01']) and (Now <= T['19:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['19:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['19:59:00']) and (Now <= T['19:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['19:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['20:00:01']) and (Now <= T['20:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['20:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['20:59:00']) and (Now <= T['20:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['20:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['21:00:01']) and (Now <= T['21:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['21:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['21:59:00']) and (Now <= T['21:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['21:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['22:00:01']) and (Now <= T['22:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['22:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 

Pal.Loop:=True;
Pal.LockExecution;
while (Now >= T['22:59:00']) and (Now <= T['22:59:10']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['22:59:55']);
ActivePlayer.FadeToStop;
DeckA.Eject;
DeckB.Eject;
Encoders.StopAll;
Pal.LockExecution;
end;
while (Now >= T['23:00:01']) and (Now <= T['23:00:08']) do
begin
Pal.UnLockExecution;
PAL.WaitForTime(T['23:00:10']);
Encoders.StartAll;
DeckA.Next;
DeckA.Play;
Pal.LockExecution;
end;
Pal.UnLockExecution; 
  
Vriendelijke Groeten Dirk65

Plaats reactie
  • Vergelijkbare Onderwerpen
    Reacties
    Weergaves
    Laatste bericht