Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: $iflonger (Read 2577 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

$iflonger

Why does $iflonger(a,b,c,d) seem to behave differently than $if($longer(a,b),c,d)? I can't get $iflonger() to work to way I want it to at all, I have to use $if($longer()). I fiddled around with it to the point where "longer" started to not look like a word anymore. =D

If it helps, I'm making a playlist display script that counts the characters in the %album%, %artist% and %title% tags and if they contain too many characters to fit in my minimalist-narrow foobar, it abbreviates the longest one. Some time I'll work on getting it to abbreviate another field if it's still too long, but with my current playlist it's not a problem. I've got the script working, it just bugs me that $iflonger() doesn't work how it seems to me it's supposed to.

I wish I could post my source code, but it's on the copy of foobar on my USB drive, and the USB on my home computer is hosed, and my work computer doesn't have internet. =(


$iflonger

Reply #2
Yes, show us the code.

I'm using something like this (just a sample) :

Code: [Select]
$iflonger('V.A.▪ '%album%,59,$left(%album%,$sub(55,$len('V.A.▪  ')))$get(color_alb)' (...)',%album%$if(%performer%,$get(color_tit)' (int. '%performer%')')),


and I can tell you it works fine