I like the option to scroll the window title in Winamp. So I wrote the following code to do something similar in foobar2000:
$puts(t,[%artist% - ][%tracknumber% - ]%title%$if(%artist%, *** ,))
$puts(l,$len($get(t)))
$puts(n,$mod($mul(%playback_time_seconds%, 3),$get(l)))
$trim(
$if(%ispaused%,$replace($get(t), *** ,' [Paused]'),
$right($get(t),$sub($len($get(t)), $get(n)))
$left($get(t), $get(n))
))
Feel free to use this script, but it has several shortcomings, and I was wondering if there was any way around them.
1) I couldn't find a way to change how often the window title is updated. Is there a way to do this?
2) It relies on %playback_time_seconds%, so the title won't scroll when foobar is paused. Is there another variable I could use, or is there a way to store 'static' variables that persist over different evaluations of the script?
Thanks in advance for your help.
