登录:     


Forum: VirtualDJ Skins

Topic: Dynamic text in "Textzone"
I have an old iPad 2nd gen runnign an ancient version of the remote software & this code displays the value of "newBPM":

<Textzone>
<Size width="80" height="30"/>
<Pos x="141" y="75"/>
<Text size="25" align="left" color="#E1E1E1" weight="bold" action="get_var 'newBPM'"/>
</Textzone>

The very same code doesn't work on my new Android tablet running the latest remote version?
I've tried all combinations of "format", "action", with/without backticks & it steadfastly refuses to display ANY variables?
 

发表时间 3 days ago @ 9:50 pm
Variables are local in Remote, meaning var A on Remote can be different from var A on desktop.
Try action="remote_action & get_var 'newBPM'"
 

ah... that would explain a few things! Can variables be shared between?
 

With remote_action as mentioned
 

That doesn't seem to work. The variable 'newBPM' is set from buttons on the custom skin. The variable shows correctly in the var list & on a custom button on the desktop but no luck at all displaying on the skin?
 

Sorry, I remembered the syntax wrong, can you try
remote_action "get_var newBPM"
 

That didn't work either when used in the skin code:

<Textzone>
<Size width="120" height="35"/>
<Pos x="157" y="135"/>
<Text size="32" align="left" color="red" weight="bold" remote_action="get_var 'newBPM'"/>
</Textzone>

Why aren't variables global across desktop & skins? I doesn't make sense to me unless there's a good reason.
 

 <textzone>
<size width="120" height="35"/>
<pos x="157" y="135"/>
<text size="32" align="left" color="red" weight="bold" action="remote_action &apos;get_var &quot;newBPM&quot;&apos;"/>
</textzone>

 

I copied that verbatim & still no luck.
 

did you test all the above on your iPad with the "ancient" version of the Remote or your Android with the most recent one ?
 

DJPhallus wrote :
I copied that verbatim & still no luck.


Since the var is not global, but deck dependant, is the <texzone /> element inside a <deck /> element ?
 

This is the code from the iPad which runs v8.4.8515 of the remote software & it works. It doesn't on the Android version.

<Textzone>
<Size width="80" height="30"/>
<Pos x="141" y="75"/>
<Text size="25" align="left" color="#E1E1E1" weight="bold" action="get_var 'newBPM'"/>
</Textzone>

The code on the Android is inside panel & deck element.
Also, this is the code that immediately precedes it (which works):
<Textzone>
<Size width="120" height="35"/>
<Pos x="355" y="55"/>
<Text size="32" align="left" color="yellow" weight="bold" action="get_bpm"/>
</Textzone>
 

Incidentally, doesn't the version make any difference?

<Skin name="TabX9 Controller" version="8.5" width="2000" height="1200" nbdecks="4" author="DJPhallus" date="16-07-2025">

edit..

It's working. A combination of the above code & changing the version to 2025 worked!

Thank you both for pointing me in the right direction.
 

Sorry to go on....

This is a button on the Android skin:
toggle '$matchKeyMode'


How do I get the desktop var list to see it (& use it)?
 

Change the remote skin to
remote_action "toggle '$matchKeyMode'"
 

Thanks again. It's working much as intended now.

Hopefully the "remote_action" will help others too.