Quick Sign In:  

Forum: General Discussion

Topic: set writeHistory "No" when karaoke_venue_name is blank - how?
adamPRO SubscriberMember since 2022
I have karaoke_venue_name in my ONINIT (so that all my recordings have the venue name in my set recordings - I record every set).

I want VDJ to do a few things when karaoke_venue_name is left blank (i.e. when I close the window and don't fill out the popup).

I imagine it's something like

karaoke_venue_name "blank" ? set record off & set writeHistory No : set writeHistory Yes

Secondly, where would I put this? would i add it as an && command after karaoke_venue_name? I don't know if that will work as karaoke_venue_name brings up the text box, doesn't necessarily wait for a response.

TIA!
 

Posted Fri 18 Aug 23 @ 11:15 am
adamPRO SubscriberMember since 2022
Hey all, bumping this up. So, I've got the command "karaoke_venue_name" that pops up when I start VirtualDJ. If I leave it blank, I want the program to automatically stop recording and not save any history. Anyone got ideas on how to code that in, and where to put it in the script? Much appreciated!

 

Posted Sun 27 Aug 23 @ 3:31 am
locoDogPRO InfinityModeratorMember since 2013
hard to query if something hasn't changed, you have to give it time to time out before it can act.
instead approach from the other side, don't start recording until it has changed. That way it can act instantly.

karaoke_venue_name & setting writeHistory off & repeat_start_instant rsiStartUp 500ms 600 & param_equal `karaoke_venue_name` "" ? nothing : setting writeHistory on & repeat_stop rsiStartUp & record on

Since you're asking I'll explain how it works for future.
first set everything for the unchanged state, most vdj settings can be set with script with
setting "settingName" VALUE
next [blue bit] set up a repeating script with a name, a repeat time & a repeat count before it gives up checking.
500ms, 600 times. so it will time out after 5 minutes.

Now the query you're repeating
param_equal `karaoke_venue_name` "" ?
for param_equal script inside ` ` marks returns the script value, so is it equal to "" [blank string] ?

yes it's blank, do nothing/ try again in 500ms as you might not have had time to change it yet
no it is not blank [red bit], turn write history on, stop the repeating script, start recording
 

Posted Sun 27 Aug 23 @ 11:18 am