Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to make songtitle scroll in the taskbar. (Read 8135 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to make songtitle scroll in the taskbar.

sometimes the songtitle is too long to show it in the taskbar. Is there any possibility to make the title scroll in the taskbar.
Foobar 0.91, Windows XP SP2

How to make songtitle scroll in the taskbar.

Reply #1
it's not possible at this moment. you could put a scrolling text  into the statusbar though.

How to make songtitle scroll in the taskbar.

Reply #2
If it's possible to make a  scrolling script for statusbar it will work with titlebar too. Taskbar will scroll with titlebar together!

How to make songtitle scroll in the taskbar.

Reply #3
Quote
If it's possible to make a  scrolling script for statusbar it will work with titlebar too. Taskbar will scroll with titlebar together!
[a href="index.php?act=findpost&pid=236946"][{POST_SNAPBACK}][/a]

No, I don't think so. The status bar can use parameters that change during playback (like time_elapsed), and on these you can build the scrolling, like, how many letters to scroll every second... Those dynamic parameters aren't accessible in the window title, I think. I might be wrong, though.


How to make songtitle scroll in the taskbar.

Reply #5
Oh but the window title does accept functions like %_time_elapsed%.

How to make songtitle scroll in the taskbar.

Reply #6
Well, in that case, you could make a scrolling title along the following lines. (Sorry, I don't have time today to write the actual code.) You need to know the foobar formatting functions for substring and get and puts and for modulo division - see the formatting help page.

* $puts(alltext, ...all the text you want to scroll goes here...)
* $puts(separator, ...some spaces to separate...)
* $puts(displaystraight,$get(alltext)$get(separator)$get(alltext))
* $puts(alltextlength,$len($get(alltext)$get(separator)))
* $puts(scrollvisible,20) - say, 20 letters should show at a time
* $puts(startat, (modulo divide %_time_elapsed% by alltextlength)+1)
* $puts(display,substring($get(displaystraight),$startat,$startat+$scrollvisible))
* $get(display)

Sorry I can't fill in the exact syntax, if someone manages to make this scheme work, please publish the exact foobar formatting string here.
Good luck!

How to make songtitle scroll in the taskbar.

Reply #7
What about this one? 

Code: [Select]
$puts(text,$if2(%title%,%_filename%)[ - by %artist%][ - from %album%] - %_foobar2000_version% - )
$puts(length,$len($get(text)))
// OR: $puts(length,40) to show a limited number of characters only
$right($get(text),$sub($get(length),$mod(%_time_elapsed_seconds%,$get(length))))
$left($get(text),$mod(%_time_elapsed_seconds%,$get(length)))

How to make songtitle scroll in the taskbar.

Reply #8
Quote
What about this one?  

Code: [Select]
$puts(text,$if2(%title%,%_filename%)[ - by %artist%][ - from %album%] - %_foobar2000_version% - )<!--QuoteEBegin-->$puts(length,$len($get(text)))<!--QuoteEBegin-->// OR: $puts(length,40) to show a limited number of characters only<!--QuoteEBegin-->$right($get(text),$sub($get(length),$mod(%_time_elapsed_seconds%,$get(length))))<!--QuoteEBegin-->$left($get(text),$mod(%_time_elapsed_seconds%,$get(length)))

[a href="index.php?act=findpost&pid=238117"][{POST_SNAPBACK}][/a]


Mine looks allmost equal

You can also put seperators between the $right and $left commands like " - " to make it more readable.

edit: forget what i said, the seperator is alreadsy included in the first line...

How to make songtitle scroll in the taskbar.

Reply #9
There is such a scolling feature somewhere in the code for my dynamic formatting, but IIRC there is a bug in it.

As Ruby's version seems to work fine there is probably no reason to go hunting for my buggy one...

How to make songtitle scroll in the taskbar.

Reply #10
Ruby rox! 
But how can i make it scroll faster? Current cpeed is too slow for me 

P.S. Sorry, i'm lame in formatting

How to make songtitle scroll in the taskbar.

Reply #11
Try replacing $mod(%_time_elapsed_seconds%,$get(length)) with $mod($mul(%_time_elapsed_seconds%,2),$get(length))

It should scroll 2 Chars every seconds. Don't know if works, I haven't installed foobar here at my work PC.


How to make songtitle scroll in the taskbar.

Reply #13
It does change, it's just not a huge difference.

Code: [Select]
$right($get(text),$sub($get(length),$mod($mul(%_time_elapsed_seconds%,4),$get(length))))
$left($get(text),$mod($mul(%_time_elapsed_seconds%,4),$get(length)))


Try that for the last two lines, and I'm sure you'll be able to see the difference.  Changing the '4' in each line will change the number of characters moved per update.

Is there a better way to do this, i.e. cutting the update time in half instead of doubling the characters moved per update?  Sure would make it look much smoother.

How to make songtitle scroll in the taskbar.

Reply #14
Quote
Is there a better way to do this, i.e. cutting the update time in half instead of doubling the characters moved per update?  Sure would make it look much smoother.
As far as I know the playlist is only updated once per second, and I don't think there's any way to change this.


How to make songtitle scroll in the taskbar.

Reply #16
Glad it works! :-)

 

Re: How to make songtitle scroll in the taskbar.

Reply #17
::Casts "raise dead"::

I have implemented this. How do I get my content to ONLY scroll if the number of characters is above N?
Code: [Select]
♫ $puts(text,$if2(%title%,%_filename% ) -  )
$puts(length,$len($get(text)))
// OR: $puts(length,40) to show a limited number of characters only
$right($get(text),$sub($get(length),$mod(%_time_elapsed_seconds%,$get(length))))
$left($get(text),$mod(%_time_elapsed_seconds%,$get(length)))$crlf()

👥 ♫ $puts(text,$if2(%artist%,%_filename% ) -  )
$puts(length,$len($get(text)))
// OR: $puts(length,40) to show a limited number of characters only
$right($get(text),$sub($get(length),$mod(%_time_elapsed_seconds%,$get(length))))
$left($get(text),$mod(%_time_elapsed_seconds%,$get(length)))$crlf()

💿 $puts(text,$if2(%album%,%_filename% ) -  )
$puts(length,$len($get(text)))
// OR: $puts(length,40) to show a limited number of characters only
$right($get(text),$sub($get(length),$mod(%_time_elapsed_seconds%,$get(length))))
$left($get(text),$mod(%_time_elapsed_seconds%,$get(length)))$crlf()

Re: How to make songtitle scroll in the taskbar.

Reply #18
::Casts "raise dead"::

I have implemented this. How do I get my content to ONLY scroll if the number of characters is above N?
Code: [Select]
♫ $puts(text,$if2(%title%,%_filename% ) -  )
$puts(length,$len($get(text)))
// OR: $puts(length,40) to show a limited number of characters only
$right($get(text),$sub($get(length),$mod(%_time_elapsed_seconds%,$get(length))))
$left($get(text),$mod(%_time_elapsed_seconds%,$get(length)))$crlf()

👥 ♫ $puts(text,$if2(%artist%,%_filename% ) -  )
$puts(length,$len($get(text)))
// OR: $puts(length,40) to show a limited number of characters only
$right($get(text),$sub($get(length),$mod(%_time_elapsed_seconds%,$get(length))))
$left($get(text),$mod(%_time_elapsed_seconds%,$get(length)))$crlf()

💿 $puts(text,$if2(%album%,%_filename% ) -  )
$puts(length,$len($get(text)))
// OR: $puts(length,40) to show a limited number of characters only
$right($get(text),$sub($get(length),$mod(%_time_elapsed_seconds%,$get(length))))
$left($get(text),$mod(%_time_elapsed_seconds%,$get(length)))$crlf()
Use
Code: [Select]
$ifgreater(string, N integer, then, else)
also when I set it to only show a certain characters aka $puts(length,24), how do I make it so that it starts from the very first character of the string instead of scrolling from  last characters as i increase the $puts(length,N) ?