UI columns tutorial

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.

// This text is some comment about your code

The // characters must be at the beginning of the line, else it won't work

$if(%artist%,%title%,) // This won't be a comment

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

$if(
   %artist%,
   %title%,
   %filename%
)

More crappy but will work

$if(
%artist%,
%title%,
%filename%
)

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:

$if($strcmp(%tracknumber%,01),%artist%)
$if($strcmp(%tracknumber%,02),%album%)
$if($strcmp(%tracknumber%,03),%date%)
$if($strcmp(%tracknumber%,04),%comment%)

Is worse than:

$select(%tracknumber%,%artist%,%album%,%date%,%comment%)

Syntax Highlighting

You can highlight your text in some programs, making things easier (missing parenthesis or comas will be easier to detect). Syntax Highlighting Scripts Within, to make Title Formatting easier It works with UltraEdit32, TextPad, jEdit, Notepad++, EditPlus, UltraEdit, UltraEdit 11

Related pages

 

July 14 2008 15:32:14.    

Creative Commons LicenseLicensed under
CC A-NC-SA 3.0.