Help - Search - Members - Calendar
Full Version: $or
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
R2D2
Dunno if this is the right forum, sorry in advance if it is wrong....

How do I use the $or function? I want to have like this:

If the playlist name is x or y or a...do this, of not....do that.

But I can't get the $or-function to work....how do I use it?
Paranoia
CODE
$if($or($strcmp(%_playlist_name%,x),$strcmp(%_playlist_name%,y),$strcmp(%_playlist_name%,a)),do this,do that)


Steve

[EDIT=typo]
picmixer
The general syntax of the $or() command should look like this
CODE
$if($or(w,x),y,z)


Meaning if either w or x are true it will execute y otherwise z.

In case you want to expand your string by several $or() commands you need something like this
CODE
$if($or($or(v,w),x),y,z)


Hmh and no the development forum probably wasn't the right place to post this. Please read the notice here about what the development forum is meant for
foosion
QUOTE(picmixer @ Jun 12 2004, 02:33 PM)
In case you want to expand your string by several $or() commands you need something like this
CODE
$if($or($or(v,w),x),y,z)

Actually, you can just use
CODE
$if($or(a,b,c),then,else)

Like $and and $xor, $or can take an arbitrary number of arguments.
R2D2
Ok...thanks to you all!
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.