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: Track Info Mod + Random Images? (Read 2584 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Track Info Mod + Random Images?

This may seem like a fairly odd question, but I wanted to know if it were possible for the Track Info Mod to display *random* images from a specified directory. So that each time a song changed, images that are in a track info mod could be switched around.

For example:

$imageabs(2,8,%foobar_profile_directory%\subfolder\*.png,alpha-150)

Where * would tell the track info mod to change the image when a new song is played. Thats just a rough example. I'm sure a better method could be arranged.

I don't know if its already possible, and I just haven't found it, or if it just doesn't exist.
Song List: keikoniumboards.ke.funpic.org/files/songlist.html

Track Info Mod + Random Images?

Reply #1
as far as i know trackinfomod and singlecoloumnplaylist don't support * wildcards. but you could do this if you know the filenames of your covers. like setting foobar to choose a random image out of some you define. you would need to specify all the filenames tho. (front.png, back.png, etc)

Track Info Mod + Random Images?

Reply #2
trackinfomod does support wildcards in both $imageabs2() and $fileexists() however there is no real way to tell it to choose randomly from the results of the wildcard match.

You should be able to do something like this, however:

$imageabs2(150,,,,,,2,8,/images\image$rand(5).png,)

To randomly select between images named like this:
image0.png
image1.png
image2.png
image3.png
image4.png
image5.png
all in your foobar images directory.

Track Info Mod + Random Images?

Reply #3
Sorry for the very late reply. Been having personal issues. Anyways, I'm back.

Thank you for that code Yotsuya, but it isn't 'quite' what I need  . It does indeed select images at random, but it keeps doing it lol. I need a code that will make the image random upon a track change. And only a track change.

Is that possible?
Song List: keikoniumboards.ke.funpic.org/files/songlist.html

Track Info Mod + Random Images?

Reply #4
Instead of placing the code under a // PerSecond header, place it under a // PerTrack header. This way the images will only change when you change tracks not every second.