My format needed means to judge single files.
I judege playlist style by file extentions now.
ScreenshotCODE
// Start Configure
// width of left frame
$puts(album_width,30)
// character between frames
$puts(sprit,|)
// character to clip %album%
$puts(album_sprit,-)
// in playing, space of both side of %tracknumber% are changed into this
$puts(trackno_l,E7E7E7|E7E7E7-)
$puts(trackno_r,E7E7E7|E7E7E7-)
// width for %album%,if files are not ZIP or RAR
$puts(album_cut_width,30)
// colors, (need not )
$puts(plno_color,CCCCCC|DADADA)
$puts(sprit_color,7EBABE|7EBABE)
$puts(artist_color,CCCCCC|CCCCCC)
$puts(album_color,2620BE|2620BE)
$puts(album_sprit_color,CCCCCC|CCCCCC)
$puts(title_color,CCCCCC|DADADA)
$puts(trno_color,9A9A9A|AAAAAA)
$puts(time_color,CCCCCC|DADADA)
// End Configure
// Process for %tracknumber%
$puts(trno,
// in playing, space is changed to <trackno_l>
$if(%_isplaying%,$get(trackno_l),' ')
$get(trno_color)
// change %tracknumber% into double figures,and if it's empty, change to '--'
$if(%tracknumber%,$num(%tracknumber%,2),--)
// in playing, : is changed to <trackno_l>
$if(%_isplaying%,$get(trackno_r),666666|666666:)' '
)
// End process for %tracknumber%
// Centering %album%
// calculate width of fixed format
// <album_sprit> x2 (both sides) + 2 (spaces for margin)
$puts(width_album_sprit,$add($mul($len($get(album_sprit)),2),2))
// calculate max width of %album%. <album_width> - <album_sprit>
$puts(width_max,$sub($get(album_width),$get(width_album_sprit)))
// calculate used space. if %album% is over <width_max>, cut it with $cut()
// used width is length of (cut) %album% and fixed format
$puts(width_used,$add($len($cut(%album%,$get(width_max))),$get(width_album_sprit)))
// calculate no-used width. <album_width> - used width.
$puts(width_remainder,$sub($get(album_width),$get(width_used)))
// Apportion remainder width to right and left. Judge '0.5' width $mod().
$if($stricmp($mod($get(width_remainder),2),1),
$puts(width_l,$div($get(width_remainder),2))
$puts(width_r,$add($div($get(width_remainder),2),1))
,
$puts(width_l,$div($get(width_remainder),2))
$puts(width_r,$div($get(width_remainder),2))
)
// End centering
// Showing playlist number
$get(plno_color)$num(%_playlist_number%,3) $get(sprit_color)$get(sprit)
// If file is RAR or ZIP, go to neat format
// checking file extension.(%_path_raw% of archive is started from "unpack//")
$if($stricmp($substr(%_path_raw%,1,6),unpack),
// get file extension. (characters from 10 to 12 of %_path_raw% is file ext)
$if($or($stricmp($substr(%_path_raw%,10,12),rar),$stricmp($substr(%_path_raw%,10,12),zip)),
// If %tracknumber% is 1,%Artist% is shown
$if($stricmp(%tracknumber%,1),
$if(%artist%,$get(artist_color)$padcut(%artist%,$get(album_width))
// if %tracknumber% is empty, fill up with spaces
,$repeat(' ',$get(album_width))
)
)
// If %tracknumber% is 2, Showing same as larger 3.
$if($stricmp(%tracknumber%,2),
$repeat(' ',$get(album_width))
)
// If %tracknumber% is 3, Showing %album%.
$if($stricmp(%tracknumber%,3),
$if(%album%,
$repeat(' ',$get(width_l))
$get(album_sprit_color)$get(album_sprit)
$get(album_color)$cut(%album%,$get(width_max))
$get(album_sprit_color)$get(album_sprit)
$repeat(' ',$get(width_r))
// if %tracknumber% is empty, fill up with spaces
,$repeat(' ',$get(album_width))
)
)
// If %tracknumber% is greater than 3, Showing only %title%.
// (Don't forget , in use $ifgreater())
$ifgreater(%tracknumber%,3,
$repeat(' ',$get(album_width))
,)
// if %tracknumber% is empty, fill up with spaces
$if(%tracknumber%,,$repeat(' ',$get(album_width)))
// right frame is for all tr no.
$get(sprit_color)$get(sprit)$get(sprit)
$get(trno)
$get(title_color)$if(%title%,%title%,%_filename%)
$char(9) $get(time_color)$pad_right(%_length%,5)
// end of $if() ZIP or RAR
)
// , of first $if(), start normal format
,
$if(%artist%,$get(artist_color)$padcut(%artist%,$get(album_width))
// if %tracknumber% is empty, fill up with spaces
,$repeat(' ',$get(album_width))
)
$get(sprit_color)$get(sprit)$get(sprit)
$get(trno)
$get(title_color)
[$cut(%album%,$get(album_cut_width)) - ]
$if(%title%,%title%,%_filename%)
$char(9) $get(time_color)$pad_right(%_length%,5)
// end of first $if()
)