Code questions/HintsHow to make alternate stripes ?Visual aspect / Colors
- How to make alternate stripes ?
- How to make "The Beatles" become "Beatles, The" ?
- How to put frames (lines) somewhere ?
- One of my variables doesn't work (I'm using $set_global)
- How to choose the information displayed depending on the tracknumber ?
- I'm missing a function, where could I find all functions available ?
- How to improve my speed test ?
- I would like a column to show how long ago I listened to a file
- Something like "hotness" would be nice to know if a song is one of my favorite ones
- Field remapping, what is it ? Why has it been created ?
- How to make various displaying methods for complete albums, single tracks or both kind of files in the same playlist ?
.fcs downloading, modding
- How to center, put on the left or on the right various elements in the same column ?
- How to make animation for now playing files ?
- How to put a frame at the end of an album ?
- My color code isn't working I use the syntax with "|"
- How to customize the system tray, status bar and windows title ?
Various About this tutorial and scripting tutorials
- I downloaded a .fcs, changed some things, but now it's all screwed up how to mend the original file ?
- I don't have enough time/I don't want/I'm too lazy to create a .fcs, where could I get .fcs files?
- I have seen a marvelous foobar2000, but the author didn't give the .fcs, could I get it somehow?
- Could I pick some code from an already existing .fcs ?
- I don't want people to break the .fcs file I created, could I lock it before sharing it ?
- I'm lost with my .fcs, where could I get some help?
- I want to discuss this tutorial, make a comment, add something, correct typo etc.. where could I do such a thing?
- Why this tutorial isn't in the Wiki ?
- Where could I find another tutorial for UI columns scripting?
- Will you port this guide in the wiki? Could I do it?
Several codes are available:
![]()
$ifequal($mod(%playlist_number%,2),1,color1,color2) ![]()
![]()
![]()
For alternate stripes with more colors, you can adapt this code:
![]()
$ifgreater($mod(%playlist_number%,2),0,color1,color2) ![]()
![]()
![]()
![]()
$select($add(1,$mod(%playlist_number%,n)),color1,color2,.....,colorn) ![]()
![]()
![]()
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:
You can also use progress bar functions.
![]()
$select($add(1,$mod(%playback_time_seconds,n)),action1,action2,...actionn) ![]()
![]()
![]()
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![]()
Don't go whining to the .fcs creator if you screwed up its code !!
![]()
![]()
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 ?
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?
- Hydrogen audio appearance thread
- Azrael config (often used .fcs):
Download
Related topic
Documentation
- UI columns config
- Navigator suite (often used .fcs):
Related topic (download, screenshot etc..)
I have seen a marvelous foobar2000, but the author didn't give the .fcs, could I get it somehow?
First ask himONLY ONCE
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.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)
![]()
$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%) ![]()
![]()
![]()
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
A very nice script has been created by topdownjimmy
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 tabAnd then you can use something like:
![]()
//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
// ===================================
// DATE & TIME CALCULATIONS
// calculate system-days since millenium
$puts(system_d-2000,$add(
$mul($right(%_system_year%,2),365),
$select(%_system_month%,0,31,59,90,120,151,181,212,243,273,304,334),
%_system_day%,$div($right(%_system_year%,2),4)
))
// ===================================
// GLOBAL TRACK-SPECIFIC STUFF - start
// ===================================
// DATE & TIME CALCULATIONS
$if(%last_played%,
// calculate lastplayed-days since millenium
$puts(lastplayed_d-2000,$add(
$mul($substr(%last_played%,3,4),365),$div($right(%_system_year%,2),4)
$select($substr(%last_played%,6,7),0,31,59,90,120,151,181,212,243,273,304,334),
$substr(%last_played%,9,10)))
// calculate days since last play
(days_since_last_play,$max(0,$sub($get(system_d-2000),$get(lastplayed_d-2000))))
)
![]()
![]()
![]()
In your columns
![]()
// last played
$if(%last_played%,
$ifgreater($get_global(days_since_last_play),30,$left(%last_played%,10),
ifgreater($get_global(days_since_last_play),1,$get_global(days_since_last_play) days ago,
$ifgreater($get_global(days_since_last_play),0,yesterday,
today
))))
![]()
![]()
![]()
Something like "hotness" would be nice to know if a song is one of my favorite ones
Take a look here: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: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.
August 30 2007 02:08:49.