ADDQUOTES
[] ADDQUOTES
I wrote this user action while I did my variables bonus tutorial. As you might know, it is possible to use LOM/API references to define a variable.
e.g. [] %lom-object% = song.view.selected_track.name
will catch the name of the currently selected track and store it in the variable %lom-object%
To use it in Clyphx though, you would need to mark it as a string or in other words you have to put quotes around the content. Unfortunately, this is not possible natively, but this user action is exactly written for this. I got a suggestion from tassos on discord and he tweaked the code slightly so now it will also work with any strings which have whitespaces, which was previously not possible. thanks.
Syntax fort the example above with the variable named lom-object:
[] addquotes q_lom-object %lom-object%
or more broadly:
[] addquotes dest-variable %source-variable%
I want to point out that the first argument goes without the % and the second one is with the % to pass one the value of the variable. It is because the first argument is used as a name and for the second we actually want the content of the variable.
argument 1 is the name of variable to save it to and argument 2 is the source variable.
in this example you now can do a track action and use %q_lom-object%
to point to the track which was selected when you did fill the variable.
Version 1.0 I also thought abouth how to make this more user friendly: Let’s do it all in one UA. Let me know if that is something you really want.
[] fixbindsel
as you will see here:
fixbindsel action