Help - Search - Members - Calendar
Full Version: Multiple values in a Masstagger script
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
marcomk
Hi,

I'm trying to write a masstagger script which adds a value to a field under certain conditions. However, I can't express "adding value" in a formula.

I tried something like:

$if(condition, %tag%'\ 'other_value) or

$if(condition, %tag%', 'other_value)

but it doesn't work. Resulting values are not considered multiples by infobox. What should I use as a separator to make it work?

Thanks wink.gif
foosion
Masstagger actions are inherently unconditional, i.e. they are always applied. You can't use a single masstagger script to add a varying number of fields.
marcomk
QUOTE(foosion @ Dec 15 2004, 12:09 AM)
Masstagger actions are inherently unconditional, i.e. they are always applied. You can't use a single masstagger script to add a varying number of fields.
*


Well, my intent was not to add varying number of fields, but to add a value to a field or preserve the original value of the field (in case the value I wanted to add was already there).

ie. $if($stricmp(%tag%,'bleah'),%tag%,%tag%+ bleah).

My question was: how to express in the formula: %tag%+ bleah?

Or do you want to say that you cannot use "$if" in masstagger scripts?
foosion
Suppose your files contain these tags:
QUOTE(file A)
TAG = _bleah_
QUOTE(file B)
TAG = what
TAG = ever
QUOTE(file C)
TICK = something

Then use "Format values from other fields" with destination = TAG and format = "$if($strstr([%tag%],bleah),%tag%,[%tag%]bleah)". Applying this yields the following results:
QUOTE(file A)
TAG = _bleah_
QUOTE(file B)
TAG = whateverbleah
QUOTE(file C)
TICK = something
TAG = bleah

There is no masstagger action that would give the following results:
QUOTE(file A)
TAG = _bleah_
QUOTE(file B)
TAG = what
TAG = ever
TAG = bleah
QUOTE(file C)
TICK = something
TAG = bleah


Note: $strstr(a,b) tests if b is contained in a.
marcomk
QUOTE(foosion @ Dec 15 2004, 01:30 AM)
There is no masstagger action that would give the following results:
QUOTE(file A)
TAG = _bleah_
QUOTE(file B)
TAG = what
TAG = ever
TAG = bleah
QUOTE(file C)
TICK = something
TAG = bleah

*


Thanks very much. That was exactly what I wanted to know. So it will be a feature request next time it will be updated wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.