Need some help with IF

Hey guys,

i want artist and mixartist within the artist field and seperated by comma. But how is this possible?

Temporary it's like this:

    outputto "ARTIST" # ARTIST
    sayregexp "(?<=,\"artistName\":\")[^\"]+" ", " "<<endTrack>>"
    say ", "
    sayregexp "(?<=,\"remixerName\":\")[^\"]+" ", " "<<endTrack>>"
    say "|"

Problem is, that the comma is set in any case. I dont now how to use the if clause...
Help would be very nice :slight_smile:

Greez, skrippi

QUOTE (skrippi @ Feb 20 2015, 20:41) <{POST_SNAPBACK}>
Hey guys,

i want artist and mixartist within the artist field and seperated by comma. But how is this possible?

Temporary it's like this:

    outputto "ARTIST" # ARTIST
    sayregexp "(?<=,\"artistName\":\")[^\"]+" ", " "<<endTrack>>"
    say ", "
    sayregexp "(?<=,\"remixerName\":\")[^\"]+" ", " "<<endTrack>>"
    say "|"

Problem is, that the comma is set in any case. I dont now how to use the if clause...
Help would be very nice :slight_smile:

Greez, skrippi


isn't this more or less the same problem as the one you asked in this thread
beatport.com scripts by stevehero (search & direct) - jaimz mod?

I do not understand the necessity to merge 2 fields into one without having the original structured data in separate fields. If you still have the mixartist in the field MIXARTIST, you can strip it from the ARTIST field, once you get annoyed with the flood of artist-mixartist-combinations.
So if you apply filters and actions to copy the data from MIXARTIST to ARTIST, you would not have to include an IF statement. This will eventually lead to an easier process to update the script, once updates are available as you have fewer local modifications.

Obviously ... while you ... and me ... do have no deeper knowledge how to apply the "Mp3tag Websource Scripting Language" within a websource script, ...
in order to remove a trailing comma ... or better ... simply not to "say" a trailing comma, ...
you are free to apply a following Mp3tag action, e. g. "Format value", ...
for the fine-tuning, after importing websource values, for example ...
ARTIST <== $trimRight(%ARTIST%,',')

DD.20150221.1159.CET