pic
back
back
  

UI columns tutorial

related topic Brother John's Foobar2000 Scripting Tutorial
Wiki Titleformat_Reference
Wiki Official Wiki
Wiki Appearance
Related topic Hydrogen audio appearance thread: many configs, .fcs and scripts available
Related page on this website UI columns

Well I have never created any .fcs yet. But I will try to explain some tip/tricks to create your own. as a complete newbie, I think i will have the same problems to create my first config than every other beginner, and I hope I will answer your questions. As everybody does not want the same appearance, I will put several short tips to do something special. It will not help confirmed users.

Don't hesitate to read Brother's Jhon tutorial which is really nice, well explained and detailed!!

Scripting Basis

Before writing any codeline, you must know some basic things that may seem stupid but will earn you time later.

Comments
Putting " // " characters will desactivate everything following. It's crucial to insert comments about your script. First it will be easier to read your code later if you need to change anything. As a complete script is several pages long, knowing where a specific information lies in a few seconds is nicer than reading the whole code for hours.

Image // This text is some comment about your code Image
Image Image

Image The // characters must be at the beginning of the line, else it won't work
Image $if(%artist%,%title%,) // This won't be a comment Image
Image Image
Organization
Being organized is for the least important. Having everything concerning colors in a specific place will be easier if you want to change your colors than having to go everywhere to change a few lines of code.
Colors
Just my personal taste about colors but "raw" colors such as pure white are very painful for eyes (I truely don't understand why people use white while it's one of the most tiring color for eyes). Prefer pastel colors. Even if some black with pure orange or blue could have a nice look !!. About blinking things, it is also tiring for eyes and could be annoying as it attracts eyes. Copying nice color schemes of other foobar users is also a solution!!
Indentation
Foobar does not accept proper indentation. Any space will be considered as a .. space.
Easier to read but won't work
Image $if(
   %artist%,
   %title%,
   %filename%
)
Image
Image Image
More crappy but will work
Image $if(
%artist%,
%title%,
%filename%
)
Image
Image Image
Complexity
Try to make your code as simple as possible. The simplier your code is, the better. It will use less CPU, less RAM, and less time.

For example something like:
Image $if($strcmp(%tracknumber%,01),%artist%)
$if($strcmp(%tracknumber%,02),%album%)
$if($strcmp(%tracknumber%,03),%date%)
$if($strcmp(%tracknumber%,04),%comment%)
Image
Image Image

Is worse than:
Image $select(%tracknumber%,%artist%,%album%,%date%,%comment%) Image
Image Image
Syntax Highlighting
You can highlight your text in some programs, making things easier (missing parenthesis or comas will be easier to detect).

Related topic Syntax Highlighting Scripts Within, to make Title Formatting easier
It works with UltraEdit32, TextPad, jEdit, Notepad++, EditPlus, UltraEdit, UltraEdit 11

Next page

 

August 30 2007 02:10:48.