it's me, talking to myself again
here's the code for the 'on screen display - format' field:
foo_osd|format:
//standard config: file with tags, filename starting with tracknumber, no sampler
$puts(has_tags,1)
$puts(has_number,1)
$puts(is_sampler,0)
$puts(temp_string,'')
//vars are set for standard file structure artist\album\tracknumber - title
$puts(nt_artist,$directory($extra(path_raw),2))
$puts(nt_title,$substr($extra(filename),$add($strchr($extra(filename),'-'),2),50))
$puts(nt_album,$directory($extra(path_raw),1))
//for files without tag
$if($not($meta_test(title)),$puts(has_tags,0))
//for sampler
$if($stricmp($directory($extra(path_raw),2),'sampler'),$puts(is_sampler,1))
//artist - title is stored in var temp_string, without leading tracknumber for files starting with it
$if($not($greater($strchr($extra(filename),'-'),5)),$puts(temp_string,$substr($extra(filename),$add($strchr($extra(filename),'-'),2),50)),$puts(temp_string,$extra(filename)))
//artist format
$if($strcmp($get(is_sampler),'1'),$puts(nt_artist,$substr($get(temp_string),1,$sub($strchr($get(temp_string),'-'),2))))
//title format
$if($strcmp($get(is_sampler),'1'),$puts(nt_title,$substr($get(temp_string),$add($strchr($get(temp_string),'-'),2),50)))
//album format
//no extra formatting needed - parent folder is assumed
//output
$rgb(206,0,0,255,255,255)$if($strcmp($get(has_tags),1),%artist%,$get(nt_artist))$char(10)
$rgb(0,255,0,255,255,255)$if($strcmp($get(has_tags),1),%title%,$get(nt_title))$char(10)
$rgb(0,255,0,0,0,0)$if($strcmp($get(has_tags),1),%album%,$get(nt_album))
there's another question for you script people:
how can i determine the length of a string? sounds like a stupid rtfm question but i really tried to figure it out and failed miserably. hence, the "take string from the '-' on" procedure is not optimal because i have to enter a fixed value, and the '50' i entered is way too short ...
[span style=\'font-size:8pt;line-height:100%\']moderation: Please use [ codebox ].[/span]
[span style=\'font-size:8pt;line-height:100%\']pano: can do, thx[/span]