UI columns FAQ

Code questions/Hints Visual aspect / Colors .fcs downloading, modding Various About this tutorial and scripting tutorials
How to make alternate stripes ?
Several codes are available:
Image $ifequal($mod(%playlist_number%,2),1,color1,color2) Image
Image Image
Image $ifgreater($mod(%playlist_number%,2),0,color1,color2) Image
Image Image
For alternate stripes with more colors, you can adapt this code:
Image $select($add(1,$mod(%playlist_number%,n)),color1,color2,.....,colorn) Image
Image Image

How to put frames (lines) somewhere ?
Use $set_style(frame-direction,1,color) functions See here

My color code isn't working I use the syntax with "|"
It is legacy syntax. Either check Enable legacy support for globals or use the $set_style() syntax See here

One of my variables doesn't work (I'm using $set_global)
Quote from the official wiki: Note: You can only define globals in the global string - i.e. you cannot access defined globals. . Use $put or $puts for temp variables and $set_global for final variables.

How to center, put on the left or on the right various elements in the same column ?
Use $tab()text to put your text on the right, text$tab() to put it on the left, to center your text, Use Alignment: Center and then use previous hints to put your text on the left or the right. Normally, you can put your text everywhere with those methods in the same column.

How to make animation for now playing files ?
Using functions like:
Image $select($add(1,$mod(%playback_time_seconds,n)),action1,action2,...actionn) Image
Image Image
You can also use progress bar functions. Wiki See here

How to choose the information displayed depending on the tracknumber ?
use the $select function. See here

How to put a frame at the end of an album ?
In fact, it is easier to put a frame at the top of the next album. with $set_style(frame-top,$ifequal(%tracknumber%,1,1,0),framecolor).

if you use something like a totaltracks field, you can also make something like et_style(frame-bottom,$ifequal(%tracknumber%,$meta(totaltracks),1,0),framecolor)

I downloaded a .fcs, changed some things, but now it's all screwed up how to mend the original file ?
Download it again, Re-read this tutorial :-), But Warning !! Warning !! Don't go whining to the .fcs creator if you screwed up its code !! Warning !! Warning !!

How to make various displaying methods for complete albums, single tracks or both kind of files in the same playlist ?
See here

I'm missing a function, where could I find all functions available ?
Wiki Titleformat_Reference

Field remapping, what is it ? Why has it been created ?
Field remapping is a simple way to simplify your code by providing fields without a lot of $if functions. See here

I don't have enough time/I don't want/I'm too lazy to create a .fcs, where could I get one?

I have seen a marvelous foobar2000, but the author didn't give the .fcs, could I get it somehow?
First ask him Warning !! ONLY ONCE Warning !! politely (by PM or in the post where he posted it), and if he doesn't answer, either try to recreate it from the picture you have seen or cry and complain against this cruel world.

How to improve my speed test ?
It's a quite good question, If a variable is used twice, try to use global variables to avoid calculating it twice. Use the maximum of already existing function rather than doing complex things with the few functions you know. (especially $select(), $ifequal() rather than $if($strcmp())...)

Could I pick some code from an already existing .fcs ?
Well, no harm. Warning !! But if there is comment about some code saying that the author would like to show that he created it, please keep this comment, it's just good manners.

Moreover, if you see that it'is rather a pretty tricky piece of code, giving credits to its author never harmed anyone.

I don't want people to break the .fcs file I created, could I lock it before sharing it ?
Well, removing all comments, giving weird names to your variables is a way, But rememeber that you were happy to discover already existing code explained when you needed to copy someone's .fcs. You can also give warnings in your comment that changing anything could screw all the code. Make a readme.txt, a file with a giant warning etc..

How to make "The Beatles" become "Beatles, The" ?
Use this script (taken from the wiki)
Image $if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%) Image
Image Image

Could I color my script to have something easier to read?
Syntax Highlighting Scripts Within, to make Title Formatting easier It works with UltraEdit32, TextPad, jEdit, Notepad++, EditPlus, UltraEdit, UltraEdit 11

I would like a column to show how long ago I listened to a file
Warning !! A very nice script has been created by topdownjimmy Related topic here

Another solution: I don't know who did the code, I think it is Lyx. It requires foo_playcount to work

In Globals/ Variables tab
Image //Probably created by Lyx, modded a little for bissextil (??) years (works until 2400..)
// ===================================
// Date System to know how long ago you listened to a file
// ===================================
// calculate system-days since millenium

// ===================================
// ===================================

// calculate lastplayed-days since millenium
// calculate days since last play
Image Image
And then you can use something like:
Image // last played

ifgreater($get_global(days_since_last_play),1,$get_global(days_since_last_play) days ago,
Image Image
In your columns

Something like "hotness" would be nice to know if a song is one of my favorite ones
Take a look here: Related topic Hotness

How to customize the system tray, status bar and windows title ?
Go to Display , Title formatting and then put your code in the corresponding tab use $char(10) as breaklines.

I want to discuss this tutorial, make a comment, add something, correct typo etc.. where could I do such a thing?
Very nice idea, just go there: UI columns scripting tutorial

Why this tutorial isn't in the Wiki ?
It's personal taste. I think that my navigation system is better than the wiki one and I don't like the idea that someone could change everything according to his point of vue and destruct the coherence of this tutorial.

Where could I find another tutorial for UI columns scripting?
You can go there: related topic Brother John's Foobar2000 Scripting Tutorial . It is another excellent scripting tutorial.

I'm lost with my .fcs, where could I get some help?
You can first read this tutorial or Brother John's one, the wiki, make a search and finally, if you don't find anything anywhere. Ask politely in this post foo UI columns or here (but the first topic is better I think) Hydrogen audio appearance thread

Will you port this guide in the wiki? Could I do it?
I do not intend to, too much work. But if you want to, no problem, just send me a PM on hydrogen audio forum or via my e-mail to warn me. I can even send you all files related to this tutorial.

Previous page Next page


August 30 2007 02:08:49.