Help - Search - Members - Calendar
Full Version: Replacing text on a per-second basis?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
Keikonium
Like the title says, I am wondering if it is possible to replace a string of text on a persecond basis?

What I want to do is have a piece of code cycle through a set of variables, displaying them in the same position as the previous variable was. So something like this:

CODE

$puts(artist,%artist%)
$puts(title,%title%)
$puts(album,%album%)
$puts(date,%date%)

$if3(
*second 1* = $get(artist),
*second 2* = $get(title),
*second 3* = $get(album),
*second 4* = $get(date),
repeat
)


Basically, the reason for this would be to save some space in my layout. Plus I can think of some other cool things I might beable to do with this code.

Currently, I can get my text to repeat itself, and scroll across the screen with this code:

CODE

$puts(windowtitle,$if($or(%ispaused%,%isplaying%),%artist% - %title%   ||   ))
$puts(time,%_time_elapsed_seconds%)
$substr($get(windowtitle),$mod($get(time),$add($len($get(windowtitle)),2)),$len($get(windowtitle)))$repeat($get(windowtitle),1000)
$if(%isplaying%,$get(windowtitle),No Song Playing)



Is this possible, and if so could someone help me out?
The Link
This should do what you want:
$select($add($mod(%playback_time_seconds%,4),1),$get(artist),$get(title),$get(album),$get(date))
Keikonium
QUOTE(The Link @ Jul 16 2008, 02:57) *

This should do what you want:
$select($add($mod(%playback_time_seconds%,4),1),$get(artist),$get(title),$get(album),$get(date))


Perfect! I get so confused with all the parentheses and commas sleep.gif' heh.

Thank you very much, such simple code smile.gif.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.