Connexion rapide:  

Forum: VirtualDJ Technical Support

Sujet cutom_button_name syntax
It doesn't look like I can change the color of a skins button through it's own button script but I might be able to change the name of the button. There is a keyword called custom_button_name which has no documentation beside the small snippet. I also tried a google search with no luck after I tested it with naming a button "Test"
custom_button_name "Widget" as a test in the first custom button in the default skin.
 

Posté Sun 15 May 22 @ 11:11 pm
locodogPRO InfinityModeratorMember since 2013
sample button action

toggle x

button name
`var x ? get_text "one" : get_text "zero"`
 

Posté Sun 15 May 22 @ 11:36 pm
locodogPRO InfinityModeratorMember since 2013
going your route won't get the results you want, custom_buttons are shared to every deck, if you change the name of one decks custom button it changes on all,
use dynamic naming with script in the button name text box.
but truth be told as said in other thread, this isn't a job for custom buttons if you plan to share a skin, use a regular button.
 

Posté Sun 15 May 22 @ 11:50 pm
OK I'll have to think about it and thanks it took me a moment to see that naming the button with a script you added the back tick to the command.

Thanks
 

Posté Mon 16 May 22 @ 1:11 am
@LogoDog, OK I got that working on a custom button but as you said I'd like to instead use a static button in the skin. How does one lock a regular button in the depressed state in my skin's xml as your sample code leaves the button selected in a custom button?

I'd like to depress myButton1 which would make myButton2 depressed and the following is what I was thinking but doesn't seem to work.



<button class="whitebutton" action="set_key 'D' & toggle 'myButton'2" id="myButton1">
<pos x="+130" y="+60"/>
<text text="D"/>
<textover action="var x ? get_text 'one' : get_text 'zero'" />
</button>
<button class="whitebutton" action="set_key 'E' " id="myButton2">
<pos x="+195" y="+60"/>
<text text="E"/>
<textover action="'" />
</button>
 

Posté Tue 17 May 22 @ 10:52 pm
locodogPRO InfinityModeratorMember since 2013
asfaik id is only a multibutton attribute, not a standard button,
you can have a query for button led logic separate from the action call


<button class="whitebutton" action="set_key 'D'" query="param_equal `get_key 'musical'` 'D'">
<pos x="+130" y="+60"/>
<text text="D"/>
<textover action="var x ? get_text 'one' : get_text 'zero'" />
</button>
<button class="whitebutton" action="set_key 'E'" query="param_equal `get_key 'musical'` 'E'" >
<pos x="+195" y="+60"/>
<text text="E"/>
<textover action="'" />
</button>
 

Posté Tue 17 May 22 @ 11:33 pm
Thanks @Locodog. That was blending in to a successful test I ran before you geared me in a little more. I haven't wrote VDJ scripts in about 5 years. Thanks
 

Posté Tue 17 May 22 @ 11:40 pm