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: Replacing text on a per-second basis? (Read 2326 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Replacing text on a per-second basis?

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: [Select]
$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: [Select]
$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?
Song List: keikoniumboards.ke.funpic.org/files/songlist.html

Replacing text on a per-second basis?

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

 

Replacing text on a per-second basis?

Reply #2
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 ' heh.

Thank you very much, such simple code .
Song List: keikoniumboards.ke.funpic.org/files/songlist.html