Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Script whenever a song is loaded

Dieses Thema ist veraltet und kann veraltete oder falsche Informationen enthalten.

Hello,

I'd like to write a script that executes every time a song is loaded into a player. But I can't find the place to write it (the "load event" so to speak).

I was able to find it for my controller, when I use the LOAD A / LOAD B buttons, but I'd like it also to work when I drag-and-drop a song into a player. Where is the event for this?

Thanks!
 

geposted Tue 30 Aug 16 @ 9:27 am
locoDogPRO InfinityModeratorMember since 2013
Use a repeat start script at around 100ms to query 'load pulse'
 

geposted Tue 30 Aug 16 @ 2:49 pm
Thanks locodog,

Where can I create a repeat start script?
 

geposted Wed 31 Aug 16 @ 1:17 pm
PachNPRO InfinityMember since 2009
I think you'll have to do write it in the ONINIT key of the keyboard or controller mapping if you want it to start automatically.
Or map it to a button and press the button once each session to activate the script.
It'll then run in the background until you close VDJ or exit the script with a repeat_stop script.

I'm by far not the best repeat start/stop scripter but it should be something like this:

repeat_start_instant "myScript" 100ms & load_pulse ? "DoWhatYouIntendToDoHere" : "MayBeDoSomethingElseOrNothingHere"

To stop the script just call

repeat_stop "myScript"
 

geposted Wed 31 Aug 16 @ 3:05 pm
locoDogPRO InfinityModeratorMember since 2013
Yep pretty much that except load_pulse works the other way round, it is normally true and briefly [200ms] goes false when triggered

you should revert your loading scripts on your controller as, load pulse covers all loading events
 

geposted Wed 31 Aug 16 @ 3:49 pm


(Alte Themen und Foren werden automatisch geschlossen)