Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Scripting: Is it possible to split a string? Attempting to split genre tag and filter on it.
seanPRO InfinityMember since 2018
So if I do get_genre & param_cast & debug on my current playing track it outputs two genres separated by a semicolon "Dance; House"

So if I have a filter folder with Genre is `get_genre` it only returns tracks that have both of these genres in this order "Dance; House" I want it to return any track with the genre Dance or House. Is there a way to achieve this.

I had this idea that if I could split the string on "; " I could possibly filter on each genre. But it doesn't appear that VirtualDJ scripts can do much string manipulation. I guess without arrays it makes it hard.
 

Posted Wed 15 May 24 @ 8:53 pm
locoDogPRO InfinityModeratorMember since 2013
I have a plugin that removes a known string from a string and writes that substring somewhere, I believe that's all you need, I'll think about if it needs anything more.
 

Posted Wed 15 May 24 @ 9:43 pm
seanPRO InfinityMember since 2018
Thanks loco, you've made me realise I probably need to get into plugin development next. I feel like I finally understand scripting.
 

Posted Wed 15 May 24 @ 9:56 pm