Option Speed 9
' ----------------------------------- carica HAL
Load "Theremino_HAL\Theremino_HAL.exe"
Wait Seconds 2
' ----------------------------------- accendi proiettore
Slot (3) = 1000
Wait Seconds 1
Beep
Slot (3) = 0
' ----------------------------------- inizia il loop
Goto Loop
Stop

Label EventStop
	LedTimer = 0
End

Variable Numeric Armed
Variable Numeric LedTimer
Label Loop
	' ------------------------------- leggi l'ora
	s1 = Format(Now, "HH:mm:ss")
	' ------------------------------- controlla l'ora
	If s1 > "21:30:00"
		Slot (3) = 1000
		Wait Seconds 1
		Slot (3) = 0
		Beep
		Wait Seconds 2
		Slot (3) = 1000
		Wait Seconds 1
		Slot (3) = 0
		Beep
		' -------------------------- se è ora chiudi app
		Wait Seconds 5
		Load CloseApps
		' -------------------------- e chiudi WINDOWS
		'Load CloseApps Windows
	EndIf
	' -------------------Sezione video vetrina
	' ------------------------------ led timer
	Wait Seconds 0.01
	LedTimer = LedTimer + 1
	If LedTimer > 30
		LedTimer = 0
		Slot(6) = 1000 - Slot(6)
	EndIf
	' ------------------------------ rearming
	If Slot (1) < 500
		Armed = 1
	EndIf
	' ------------------------------ start if rearmed
	If Armed = 1 And Slot (1) > 500
		Armed = 0
		Slot(6) = 0
		Gosub EseguiVideo
		Load Pause
	EndIf
Goto Loop

Label EseguiVideo
	' -------------------------------
	v1 = Int(Rnd * 38)
	'Controls OpenTextBox
	'Print v1 + CRLF
    ' -------------------------------
	Select v1
		Case 0
			Load Anastasia Vetrina 15.mp4
			Wait Seconds MediaLength - 13
		Case 1
			Load Barbuta.mp4
			Wait Seconds MediaLength - 13
		Case 2
			Load Barnabavetrina15.mp4
			Wait Seconds MediaLength - 13
		Case 3
			Load BENINI vetrina 15.mp4
			Wait Seconds MediaLength - 13
		Case 4
			Load Buonocore Martina.mp4
			Wait Seconds MediaLength - 13
		Case 5
			Load cafarelli_1.mp4
			Wait Seconds MediaLength - 13
		Case 6
			Load caplain vetrina15.mp4
			Wait Seconds MediaLength - 13
		Case 7
			Load Carta Elisa2.mp4
			Wait Seconds MediaLength - 13
		Case 8
			Load Chiodo.mp4
			Wait Seconds MediaLength - 13
		Case 9
			Load cotti vetrina 15.mp4
			Wait Seconds MediaLength - 13
		Case 10
			Load de masi vetrina 15.mp4
			Wait Seconds MediaLength - 13
		Case 11
			Load duarte_1.mp4
			Wait Seconds MediaLength - 13
		Case 12
			Load duval 15.mp4
			Wait Seconds MediaLength - 13
		Case 13
			Load Faliero.mp4
			Wait Seconds MediaLength - 13
		Case 14
			Load Fardella Chiara.mp4
			Wait Seconds MediaLength - 13
		Case 15
			Load Gaiani Alice.mp4
			Wait Seconds MediaLength - 13
		Case 16
			Load Granata.mp4
			Wait Seconds MediaLength - 13
		Case 17
			Load hutanu vetrina15.mp4
			Wait Seconds MediaLength - 13
		Case 18
			Load Lussiana.mp4
			Wait Seconds MediaLength - 13
		Case 19
			Load Mancari.mp4
			Wait Seconds MediaLength - 13
		Case 20
			Load marchesiello vetrina 15.mp4
			Wait Seconds MediaLength - 13
		Case 21
			Load Mastromatteo0_1.mp4
			Wait Seconds MediaLength - 13
		Case 22
			Load Melchionna Vetrina 15.mp4
			Wait Seconds MediaLength - 13
		Case 23
			Load Merola Silvia.mp4
			Wait Seconds MediaLength - 13
		Case 24
			Load Naji.mp4
			Wait Seconds MediaLength - 13
		Case 25
			Load Napoli.mp4
			Wait Seconds MediaLength - 13
		Case 26
			Load nyikos vetrina.mp4
			Wait Seconds MediaLength - 13
		Case 27
			Load Patella Sara.mp4
			Wait Seconds MediaLength - 13
		Case 28
			Load Pollo.mp4
			Wait Seconds MediaLength - 13
		Case 29
			Load Racca.mp4
			Wait Seconds MediaLength - 13
		Case 30
			Load Ravera vetrina15.mp4
			Wait Seconds MediaLength - 13
		Case 31
			Load Repede.mp4
			Wait Seconds MediaLength - 13
		Case 32
			Load Scaccia Elisabetta.mp4
			Wait Seconds MediaLength - 13
		Case 33
			Load Scarnato vetrina 15.mp4
			Wait Seconds MediaLength - 13
		Case 34
			Load sito vetrina15.mp4
			Wait Seconds MediaLength - 13
		Case 35
			Load Testa vetrina 15.mp4
			Wait Seconds MediaLength - 13
		Case 36
			Load Turina.mp4
			Wait Seconds MediaLength - 13
		Case 37
			Load Zelasio15.mp4
			Wait Seconds MediaLength - 13
			
	EndSelect
Return


'WATCH v1
'WATCH v2
'WATCH Load Stop
'WATCH Load Stop
'WATCH Load Stop
'WATCH Next
'EXEC Gosub 3
