14
« on: December 16, 2015, 12:34:26 PM »
Many thanks,
Here is how I solve it.
100 REM *
101 REM * Created: 12/16/15 20:28:06
102 REM * Random: off
103 REM * Repeat: off
104 REM * First Item Once: off
105 REM * Last Item Once: off
106 REM *
110 LET ListName$="Demo"
120 SETPLAYLIST ListName$
140 ONPLAYBACKEND 300
180 LET NextItem=1
200 REM *
201 REM * Play item NextItem
202 REM *
203 EXEC "c:\xlights\wget --user=myusername --password=mypassword " +"http://192.168.2.15/%20JSON?request=controldevicebyvalue&ref=261&value=0"
210 LET LastItemPlayed=NextItem
215 PRINT "At:", FORMATDATETIME$(NOW,5)
220 PRINT "Playing:",ITEMNAME$(NextItem)
230 PLAYITEM NextItem
240 WAIT
300 REM *
301 REM * Jump here at end of song or sequence
302 REM *
303 EXEC "c:\xlights\wget --user=myusername --password=mypassword " +"http://192.168.2.15/%20JSON?request=controldevicebyvalue&ref=261&value=100"
307 IF TXOVERFLOWCNT = 0 THEN 310
308 PRINT "Serial transmit overflows:",TXOVERFLOWCNT,", length:", TXOVERFLOWTOTAL
310 IF SECONDSREMAINING <= 0 THEN 400
320 LET NextItem=LastItemPlayed+1
330 IF NextItem <= PLAYLISTSIZE THEN 200
400 REM *
401 REM Reached scheduled end time
402 REM *
490 LIGHTSOFF