Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Color-queries do not work

This topic is old and might contain outdated or incorrect information.

* get_loaded_song 'color' * queries are not working correctly.
I have tried color-names and html-codes and both variants did not work.

There was a fix in the Build 3989:
- get_loaded_song 'color' 'white' to specify a default color if the track doesn't have a color.

This doesn't work either.
Is there an other way to query tracks with NO (or some other) color?
 

Posted Mon 08 Jan 18 @ 2:42 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
How exactly are you trying to use this action ?
get_loaded_song 'color' returns a color as text and can be used in skins for example to color a text a visual with the color of the loaded track.
I dont think its made to be used in queries, but you could try something like get_loaded_song 'color' & param_equal 'text' ? this : that
 

Posted Mon 08 Jan 18 @ 3:01 pm
I want to display the color of the loaded song.
But since there is text above the color-visual, i want the color to be white, or the visual should not be displayed if the song does not have a color.

Like this:

<visual type="color" deck="1" source="get_loaded_song 'color'" visibility="not get_loaded_song 'color' 'white'">
 

Posted Mon 08 Jan 18 @ 3:05 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
Works fine here on a skin i am working..
Did u check without the visibility ?
Also, saw your other post about clipmask. Try with mask instead and see if it works.
 

Posted Mon 08 Jan 18 @ 3:09 pm
How do you mean that without the visibility?
On my example I get the color displayed but there is no reaction on the visibility-query.
Can you send me your code so I can try it with that?

And I didn't even know that there is a 'mask' only child :D
I thought there is only clipmask & mousemask.
I'll try it with the mask thing and tell you if it works, thanks!
Could you send me your code you mentioned? :)
 

Posted Mon 08 Jan 18 @ 3:18 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
is not nothing special.. here is my code which shows the colored rect you see inside the jog..
<visual type="color" source="get_loaded_song 'color'" visibility="var '@$showtrackcolor' 1" >
<size width="20" height="3"/>
<pos x="+38+35" y="+41"/>
</visual>

The visibility is just a variable i use from a menu. You can skip that.

you can also use the same action for texts, inside the color="" attribute.
<textzone >
<size width="327-78+55+22" height="24"/>
<pos x="+10+78" y="+11+24"/>
<up x="+0" y="+0"/>
<text size="24" color="`get_loaded_song 'color' 'white'`" weight="bold" action="get_title"/>
</textzone>


 

Posted Mon 08 Jan 18 @ 3:30 pm
Ok, this seems very similar to my version.
So the color is always displayed correctly so far...

But how can I hide the color-visual (automatically) if the track has NO color?
So if it has a color, then the color will be displayed, and if it doen't have a color, then the visual is hidden?
 

Posted Mon 08 Jan 18 @ 3:43 pm
locodogPRO InfinityModeratorMember since 2013
If I remember, no colour is hex black so 000000 I can't remember the script for hex colours but query that if true visibility off if false get colour.
 

Posted Mon 08 Jan 18 @ 4:31 pm
I tried the following:

<visual type="color" deck="1" source="get_loaded_song 'color'" visibility="not get_loaded_song 'color' 'white'">
<size width="20" height="20"/>
<pos x="440" y="340"/>
</visual>


<visual type="color" deck="1" source="get_loaded_song 'color'" visibility="not get_loaded_song 'color' 'black'">
<size width="20" height="20"/>
<pos x="440" y="340"/>
</visual>


<visual type="color" deck="1" source="get_loaded_song 'color'" visibility="not get_loaded_song 'color' 'none'">
<size width="20" height="20"/>
<pos x="440" y="340"/>
</visual>


<visual type="color" deck="1" source="get_loaded_song 'color'" visibility="not get_loaded_song 'color' '0'">
<size width="20" height="20"/>
<pos x="440" y="340"/>
</visual>


<visual type="color" deck="1" source="get_loaded_song 'color'" visibility="not get_loaded_song 'color' 0">
<size width="20" height="20"/>
<pos x="440" y="340"/>
</visual>


<visual type="color" deck="1" source="get_loaded_song 'color'" visibility="not get_loaded_song 'color' '#000000'">
<size width="20" height="20"/>
<pos x="440" y="340"/>
</visual>


<visual type="color" deck="1" source="get_loaded_song 'color'" visibility="not get_loaded_song 'color' '#ffffff'">
<size width="20" height="20"/>
<pos x="440" y="340"/>
</visual>


<visual type="color" deck="1" source="get_loaded_song 'color'" visibility="not get_loaded_song 'color' #000000">
<size width="20" height="20"/>
<pos x="440" y="340"/>
</visual>


<visual type="color" deck="1" source="get_loaded_song 'color'" visibility="not get_loaded_song 'color' #ffffff">
<size width="20" height="20"/>
<pos x="440" y="340"/>
</visual>



and every kind of the color code (white, black, #000000, #ffffff, etc) without the visibility, like this:

<visual type="color" deck="1" source="get_loaded_song 'color' 'white' ? off : get_loaded_song 'color'">
<size width="20" height="20"/>
<pos x="440" y="340"/>
</visual>



Nothing of all that works.
So I think the "language" must be unable to work with this query.
But why is it in the 3989 Build?
I tried it with 3994 & 4032.

Does someone know something else about that or has an idea what to try next?
 

Posted Mon 08 Jan 18 @ 7:46 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
I think i said at the beginning that the action returns a text (and not true/false), so something like that should work..

visibility="get_loaded_song 'color' 'white' & param_equal 'white' ? false : true "
 

Posted Mon 08 Jan 18 @ 8:53 pm
YEEEEEEEEES!!!!!!!!!!!!

Now it works!!

THANKS DAD!! :D
 

Posted Tue 09 Jan 18 @ 5:16 am


(Old topics and forums are automatically closed)