Ingreso rápido:  

Forum: VirtualDJ Technical Support

Tema: Event Scheduler - To play a different playlist on specific dates
Sorry if the title is a little strange. But currently i have VDJ event scheduler playing like a randomised playlist of songs which plays as soon as the computer is turned on. But i was wondering if there was a way to program the scheduler to check the day or date first and then play a different playlist instead. Ie like Monday - Thursday it plays playlist X and on Fri-Sun plays Y. Or that on the 01/01/23 it plays a different playlist just for that day.... so that i could plan to have that playlist set a few days in advance and not have to manually adjust it on the day.

Thanks guys,
 

Mensajes Thu 11 May 23 @ 1:06 pm
locoDogPRO InfinityModeratorMember since 2013
I had to remind myself how to do it.
This will give you a number between 0 & 6, zero = sunday [I think]

set day `countdown '2023/01/01 00:00' '%DD' & param_cast 'int_trunc' & param_mod 7`
 

Mensajes Thu 11 May 23 @ 1:49 pm
One way to approach this is to use vbscript at system startup.

This assumes you have a playlist for each day of the week in C:\Playlists and that the playlist you're playing from VDJ is "today.m3u". You can obviously modify those values in the code. Set the vbscript to run at startup before VDJ and you should be set.

'Set up a few variables
Dim playlist
Dim objShell
Dim strPath
Dim FSO

'Select which playlist to use by the day of the week
select case Weekday()
case 1
playlist="Sunday.m3u"
case 2
playlist="Monday.m3u"
case 3
playlist="Tuesday.m3u"
case 4
playlist="Wednesday.m3u"
case 5
playlist="Thursday.m3u"
case 6
playlist="Friday.m3u"
case 7
playlist="Saturday.m3u"
end select

'Get the Documents path for VDJ
Set objShell = Wscript.CreateObject("Wscript.Shell")
strMyPath = objShell.SpecialFolders("MyDocuments")

'Copy the file
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFile "C:\Playlists\" + playlist, strMyPath+"\Virtual DJ\Playlists\today.m3u", true


 

Mensajes Fri 12 May 23 @ 4:51 pm
lockie2000 wrote :
Sorry if the title is a little strange. But currently i have VDJ event scheduler playing like a randomised playlist of songs which plays as soon as the computer is turned on. But i was wondering if there was a way to program the scheduler to check the day or date first and then play a different playlist instead. Ie like Monday - Thursday it plays playlist X and on Fri-Sun plays Y. Or that on the 01/01/23 it plays a different playlist just for that day.... so that i could plan to have that playlist set a few days in advance and not have to manually adjust it on the day.


Dougal thank you!!! That's what I have been looking for for 4 years, now to absorb the resulting code. Slán!

Thanks guys,
 

Mensajes Mon 04 Nov 24 @ 5:17 pm