Se Connecter:     


Forum: VirtualDJ Technical Support

Sujet: Bug?: Controller LoadSecurity

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

I want to creat a shortcut by SHift+S to switch "LoadSecurity" on and off.

So:
setting "loadSecurity" silent

works fine

But
setting "loadSecurity" on
or
setting "loadSecurity" off
doesn't work. Why? Is it a bug?

I also tested instead of "on/off", "0/1" and "yes/no". But it doesn't work, too.

Thank you

greetings

Patrick
 

Posté Thu 05 Sep 19 @ 8:58 am
try to add quotes around "on" and "off"
 

Why does the loadSecurity option need quotation marks if similar actions like autHeadphones (no/ onload/ always) do not need quotation marks?
 

Because on and off without quotation marks are recognized as booleans in script parameters.
 

...and in this case the “on” and “off” are the literal strings for the VDJ setting.
 

Okay, that makes sense. Thanks.
 


I want to build a button in my skin to switch between the "load-security" options "off" and "silent". The Button should be "on" when the option "silent" is active and "off" when "off" is active. But this feedback of the button doesn't work.

<define class="security" action=" setting 'loadSecurity' "off" ? setting 'loadSecurity' "silent" & on : setting 'loadSecurity' "off" & off" >

<size width="48" height="27"/>
<on x="1412" y="1196"/>
<off x="1294" y="1196"/>
<over x="1353" y="1196"/>
<text size="15" weight="bold" align="center" color="#aaaaaa" format="AUTO"/>
<textover size="15" weight="bold" align="center" color="white" format="AUTO"/>
<textselected size="15" weight="bold" align="center" color="white" format="AUTO"/>
</define>

Could somebody help me?


Greetings
Patrick


 

1- You try to use double quotes in double quoted string in your action

action=" setting 'loadSecurity' "off" ? setting 'loadSecurity' "silent" & on : setting 'loadSecurity' "off" & off"

would be
action="setting 'loadSecurity' 'off' ? setting 'loadSecurity' 'silent' & on : setting 'loadSecurity' 'off' & off"
or
action="setting 'loadSecurity' 'silent' ? setting 'loadSecurity' 'off' : setting 'loadSecurity' 'silent' "

badly parameters passing prevent button to toggle as there is no param reported

2 -
param_equal "setting 'loadSecurity'" 'silent' ? setting 'loadSecurity' 'off' : setting 'loadSecurity' 'silent'
param_equal `setting 'loadSecurity'` 'silent' ? setting 'loadSecurity' 'off' : setting 'loadSecurity' 'silent'

would hilight the button but query is ignored

3.-
finally a workaround set a var ls and the setting in ONINIT to match the initial wanted state and
action=" toggle ls & var ls ? setting 'loadSecurity' 'silent' : setting 'loadSecurity' 'off' "

another working one : - really dont know why -
action="setting 'loadSecurity' 'silent' ? setting 'loadSecurity' 'off' & param_add 1 : setting 'loadSecurity' 'silent' "
 



(Les anciens sujets et forums sont automatiquement fermés)